- Posts: 2696
- Thank you received: 74
Nom du fabricant dans product show
4 years 3 weeks ago #344560
by erickb
Nom du fabricant dans product show was created 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
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.
4 years 3 weeks ago #344568
by nicolas
Replied by nicolas on topic Nom du fabricant dans product show
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:
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.
4 years 3 weeks ago #344609
by erickb
Replied by erickb on topic Nom du fabricant dans product show
Merci
Please Log in or Create an account to join the conversation.
Time to create page: 0.156 seconds