guil182 Posted July 29, 2014 Share Posted July 29, 2014 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 resoudre cela ? Merci d'avance Link to comment Share on other sites More sharing options...
shaun_imakr Posted August 20, 2014 Share Posted August 20, 2014 (edited) Salut, avez-vous trouvé la solution pour cela? J'ai le même problème. Edited August 22, 2014 by shaun_imakr (see edit history) Link to comment Share on other sites More sharing options...
PascalVG Posted August 22, 2014 Share Posted August 22, 2014 I'll move this post to French forum... pascal. (Shaun, A french post, but in English forum. Please re-write your question in English and post again.) 1 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