// removing cookie from product customization

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7680 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-07-21 14:38:04 +00:00
parent ff2df3e3b3
commit 462c362191
48 changed files with 421 additions and 348 deletions
+12 -12
View File
@@ -83,7 +83,7 @@ class CategoryControllerCore extends FrontController
foreach ($rewrite_infos AS $infos)
$default_rewrite[$infos['id_lang']] = self::$link->getCategoryLink((int)$id_category, $infos['link_rewrite'], $infos['id_lang']);
$this->smarty->assign('lang_rewrite_urls', $default_rewrite);
self::$smarty->assign('lang_rewrite_urls', $default_rewrite);
}
}
@@ -99,13 +99,13 @@ class CategoryControllerCore extends FrontController
elseif (!$this->category->checkAccess((int)(self::$cookie->id_customer)))
$this->errors[] = Tools::displayError('You do not have access to this category.');
elseif (!$this->category->active)
$this->smarty->assign('category', $this->category);
self::$smarty->assign('category', $this->category);
else
{
$rewrited_url = self::$link->getCategoryLink((int)$this->category->id, $this->category->link_rewrite);
/* Scenes (could be externalised to another controler if you need them */
$this->smarty->assign('scenes', Scene::getScenes((int)($this->category->id), (int)(self::$cookie->id_lang), true, false));
self::$smarty->assign('scenes', Scene::getScenes((int)($this->category->id), (int)(self::$cookie->id_lang), true, false));
/* Scenes images formats */
if ($sceneImageTypes = ImageType::getImagesTypes('scenes'))
@@ -117,18 +117,18 @@ class CategoryControllerCore extends FrontController
elseif ($sceneImageType['name'] == 'large_scene')
$largeSceneImageType = $sceneImageType;
}
$this->smarty->assign('thumbSceneImageType', isset($thumbSceneImageType) ? $thumbSceneImageType : NULL);
$this->smarty->assign('largeSceneImageType', isset($largeSceneImageType) ? $largeSceneImageType : NULL);
self::$smarty->assign('thumbSceneImageType', isset($thumbSceneImageType) ? $thumbSceneImageType : NULL);
self::$smarty->assign('largeSceneImageType', isset($largeSceneImageType) ? $largeSceneImageType : NULL);
}
$this->category->description = Tools::nl2br($this->category->description);
$subCategories = $this->category->getSubCategories((int)(self::$cookie->id_lang));
$this->smarty->assign('category', $this->category);
self::$smarty->assign('category', $this->category);
if (isset($subCategories) AND !empty($subCategories) AND $subCategories)
{
$this->smarty->assign('subcategories', $subCategories);
$this->smarty->assign(array(
self::$smarty->assign('subcategories', $subCategories);
self::$smarty->assign(array(
'subcategories_nb_total' => sizeof($subCategories),
'subcategories_nb_half' => ceil(sizeof($subCategories) / 2)));
}
@@ -136,10 +136,10 @@ class CategoryControllerCore extends FrontController
{
$nbProducts = $this->category->getProducts(NULL, NULL, NULL, $this->orderBy, $this->orderWay, true);
$this->pagination((int)$nbProducts);
$this->smarty->assign('nb_products', (int)$nbProducts);
self::$smarty->assign('nb_products', (int)$nbProducts);
$cat_products = $this->category->getProducts((int)(self::$cookie->id_lang), (int)($this->p), (int)($this->n), $this->orderBy, $this->orderWay);
}
$this->smarty->assign(array(
self::$smarty->assign(array(
'products' => (isset($cat_products) AND $cat_products) ? $cat_products : NULL,
'id_category' => (int)($this->category->id),
'id_category_parent' => (int)($this->category->id_parent),
@@ -154,7 +154,7 @@ class CategoryControllerCore extends FrontController
}
}
$this->smarty->assign(array(
self::$smarty->assign(array(
'allow_oosp' => (int)(Configuration::get('PS_ORDER_OUT_OF_STOCK')),
'comparator_max_item' => (int)(Configuration::get('PS_COMPARATOR_MAX_ITEM')),
'suppliers' => Supplier::getSuppliers()
@@ -164,7 +164,7 @@ class CategoryControllerCore extends FrontController
public function displayContent()
{
parent::displayContent();
$this->smarty->display(_PS_THEME_DIR_.'category.tpl');
self::$smarty->display(_PS_THEME_DIR_.'category.tpl');
}
}