Skip to main content

Nom du fabricant dans product show

More
4 years 3 weeks ago #344560 by erickb
-- HikaShop version -- : 4.6.1

Bonjour

Je trouve le product_manufacturer_id dans la fiche du produit mais comment je trouve le nom du fabricant ?
Merci

Please Log in or Create an account to join the conversation.

More
4 years 3 weeks ago #344568 by nicolas
Bonjour,

Sur la fiche produit, le nom du fabricant est normalement déjà affiché par le code ci-dessus dans le fichier de vue show_block_dimensions:
Code:
<!-- BRAND --> <?php if($this->config->get('manufacturer_display', 0) && !empty($this->element->product_manufacturer_id)){ $categoryClass = hikashop_get('class.category'); $manufacturer = $categoryClass->get($this->element->product_manufacturer_id); if($manufacturer->category_published){ $menuClass = hikashop_get('class.menus'); $Itemid = $menuClass->loadAMenuItemId('manufacturer','listing'); if(empty($Itemid)){ $Itemid = $menuClass->loadAMenuItemId('',''); } $categoryClass->addAlias($manufacturer); echo JText::_('MANUFACTURER').': '.'<a href="'.hikashop_contentLink('category&task=listing&cid='.$manufacturer->category_id.'&name='.$manufacturer->alias.'&Itemid='.$Itemid,$manufacturer).'">'.$manufacturer->category_name.'</a>'; echo "<span style='display:none;' itemprop='brand'>". $manufacturer->category_name ."</span>"; } } ?> <!-- EO BRAND -->
The following user(s) said Thank You: erickb

Please Log in or Create an account to join the conversation.

More
4 years 3 weeks ago #344609 by erickb
Merci

Please Log in or Create an account to join the conversation.

Time to create page: 0.156 seconds
Powered by Kunena Forum