[-] FO: Fix #PSCFV-5143

This commit is contained in:
rGaillard
2012-10-23 08:29:24 +00:00
parent 0eafc88cbd
commit 22b8a891cc
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -376,7 +376,7 @@ class CategoryCore extends ObjectModel
if (!$this->id_parent)
return 0;
$parent_category = new Category($this->id_parent);
$parent_category = new Category((int)$this->id_parent);
if (!Validate::isLoadedObject($parent_category))
throw new PrestaShopException('Parent category does not exist');
return $parent_category->level_depth + 1;
+1 -1
View File
@@ -1106,7 +1106,7 @@ class FrontControllerCore extends Controller
$blocksupplier = Module::getInstanceByName('blocksupplier');
$this->context->smarty->assign('categoriesTree', Category::getRootCategory()->recurseLiteCategTree(0));
$this->context->smarty->assign('categoriescmsTree', CMSCategory::getRecurseCategory($this->context->language->id, 1, 1, 1));
$this->context->smarty->assign('voucherAllowed', (int)Configuration::get('PS_VOUCHERS'));
$this->context->smarty->assign('voucherAllowed', (int)CartRule::isFeatureActive());
$this->context->smarty->assign('display_manufacturer_link', (bool)$blockmanufacturer->active);
$this->context->smarty->assign('display_supplier_link', (bool)$blocksupplier->active);
$this->context->smarty->assign('PS_DISPLAY_SUPPLIERS', Configuration::get('PS_DISPLAY_SUPPLIERS'));
+2 -2
View File
@@ -49,8 +49,8 @@ class MyAccountControllerCore extends FrontController
$has_address = $this->context->customer->getAddresses($this->context->language->id);
$this->context->smarty->assign(array(
'has_customer_an_address' => empty($has_address),
'voucherAllowed' => (int)(Configuration::get('PS_VOUCHERS')),
'returnAllowed' => (int)(Configuration::get('PS_ORDER_RETURN'))
'voucherAllowed' => (int)CartRule::isFeatureActive(),
'returnAllowed' => (int)Configuration::get('PS_ORDER_RETURN')
));
$this->context->smarty->assign('HOOK_CUSTOMER_ACCOUNT', Hook::exec('displayCustomerAccount'));
+1 -1
View File
@@ -328,7 +328,7 @@ class ParentOrderControllerCore extends FrontController
'token_cart' => Tools::getToken(false),
'isVirtualCart' => $this->context->cart->isVirtualCart(),
'productNumber' => $this->context->cart->nbProducts(),
'voucherAllowed' => Configuration::get('PS_VOUCHERS') && CartRule::isFeatureActive(),
'voucherAllowed' => CartRule::isFeatureActive(),
'shippingCost' => $this->context->cart->getOrderTotal(true, Cart::ONLY_SHIPPING),
'shippingCostTaxExc' => $this->context->cart->getOrderTotal(false, Cart::ONLY_SHIPPING),
'customizedDatas' => $customizedDatas,
+1 -1
View File
@@ -46,7 +46,7 @@ class SitemapControllerCore extends FrontController
$this->context->smarty->assign('categoriesTree', Category::getRootCategory()->recurseLiteCategTree(0));
$this->context->smarty->assign('categoriescmsTree', CMSCategory::getRecurseCategory($this->context->language->id, 1, 1, 1));
$this->context->smarty->assign('voucherAllowed', (int)Configuration::get('PS_VOUCHERS'));
$this->context->smarty->assign('voucherAllowed', (int)CartRule::isFeatureActive());
$blockmanufacturer = Module::getInstanceByName('blockmanufacturer');
$blocksupplier = Module::getInstanceByName('blocksupplier');