Jump to content

itinerate Categories of a product in product page


Recommended Posts

Hi. I have the next code.

 

//implement foreach to obtain all the categories

 

<a class="title_scene_cat">

{strip}

{$category->name|escape:'htmlall':'UTF-8'}

{if isset($categoryNameComplement)}

{$categoryNameComplement|escape:'htmlall':'UTF-8'}

{/if}

{/strip}

</a>

<div class="content_scene_cat">

{if $scenes}

<!-- Scenes -->

{include file="$tpl_dir./scenes.tpl" scenes=$scenes}

{else}

<!-- Category image -->

{if $category->id_image}

<div class="align_center">

<img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" />

</div>

{/if}

{/if}

 

{if $category->description}

<div class="cat_desc">

<p>{$category->description}</p>

</div>

{/if}

 

But I need to show all the categories that have the product.. use a foreach like {foreach from=Product::getProductCategoriesFull(Tools::getValue('id_product')) item=cat}

 

Can you help me?

Link to comment
Share on other sites

×
×
  • Create New...