Nom du fabricant dans product show

  • Posts: 2639
  • Thank you received: 66
  • Hikashop Business
2 years 2 months ago #344560

-- 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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 2 months ago #344568

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:

<!-- 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.

  • Posts: 2639
  • Thank you received: 66
  • Hikashop Business
2 years 2 months ago #344609

Merci

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

Time to create page: 0.058 seconds
Powered by Kunena Forum