guil182 Posted July 29, 2014 Share Posted July 29, 2014 (edited) Bonjour, Je veux ajouter la mention TTC après le prix dans product-list. Aussi je fais cette modification : <span itemprop="price" class="price product-price"> {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} {if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) || !isset($display_tax_label))} {if $priceDisplay == 1 || $primeursHT == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if} {/if} </span> et pour que tax_enabled soit connu du controller category: public function initContent() { parent::initContent(); $this->setTemplate(_PS_THEME_DIR_.'category.tpl'); if (!$this->customer_access) return; if (isset($this->context->cookie->id_compare)) $this->context->smarty->assign('compareProducts', CompareProduct::getCompareProducts((int)$this->context->cookie->id_compare)); $this->productSort(); // Product sort must be called before assignProductList() $this->assignScenes(); $this->assignSubcategories(); $this->assignProductList(); $this->context->smarty->assign(array( 'category' => $this->category, 'description_short' => Tools::truncateString($this->category->description, 350), 'products' => (isset($this->cat_products) && $this->cat_products) ? $this->cat_products : null, 'id_category' => (int)$this->category->id, 'id_category_parent' => (int)$this->category->id_parent, 'return_category_name' => Tools::safeOutput($this->category->name), 'path' => Tools::getPath($this->category->id), 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), 'categorySize' => Image::getSize(ImageType::getFormatedName('category')), 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), 'thumbSceneSize' => Image::getSize(ImageType::getFormatedName('m_scene')), 'homeSize' => Image::getSize(ImageType::getFormatedName('home')), 'allow_oosp' => (int)Configuration::get('PS_ORDER_OUT_OF_STOCK'), 'comparator_max_item' => (int)Configuration::get('PS_COMPARATOR_MAX_ITEM'), 'suppliers' => Supplier::getSuppliers(), 'tax_enabled' => Configuration::get('PS_TAX'), 'body_classes' => array($this->php_self.'-'.$this->category->id, $this->php_self.'-'.$this->category->link_rewrite) )); } MAIS quand j'applique un filtre de blocklayered, j'ai un superbe Undefined index: tax_enabled Comment résoudre cela ? Merci d'avance Edited July 29, 2014 by guil182 (see edit history) Link to comment Share on other sites More sharing options...
guil182 Posted July 30, 2014 Author Share Posted July 30, 2014 Je me reponds : J'ai ajouté la variable smarty tout simplement dans le front controller qui est toujours appelé.... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now