[-] FO: Fix #PSCFV-5143
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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'));
|
||||
|
||||
@@ -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'));
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user