Jump to content

Edit History

Abu Joury

Abu Joury

On 9/20/2021 at 12:57 PM, hhcj said:

This works in prestashop 1.7.7.5 in product tpl

<ul class="productcats">
  {foreach from=Product::getProductCategories($product.id) item=cat}
	{if $cat > 2}
		{assign var='current_cat' value=Category::getCategoryInformations(array($cat))}
		<li><a href="{$link->getCategoryLink({$cat})}" title="{$current_cat[{$cat}]['name']}">{$current_cat[{$cat}]['name']}</a></li>
	{/if}
  {/foreach}
</ul>

 

This has worked for me:

It's Category::getCategoryInformation(array($cat))} not "getCategoryInformations(...)"

 
<ul class="productcats">
{foreach from=Product::getProductCategories($product.id) item=cat}
{if $cat > 2}
{assign var='current_cat' value=Category::getCategoryInformation(array($cat))}
<li><a href="{$link->getCategoryLink({$cat})}" title="{$current_cat[{$cat}]['name']}">{$current_cat[{$cat}]['name']}</a></li>
{/if}
{/foreach}
</ul>

 

Abu Joury

Abu Joury

On 9/20/2021 at 12:57 PM, hhcj said:

This works in prestashop 1.7.7.5 in product tpl

<ul class="productcats">
  {foreach from=Product::getProductCategories($product.id) item=cat}
	{if $cat > 2}
		{assign var='current_cat' value=Category::getCategoryInformations(array($cat))}
		<li><a href="{$link->getCategoryLink({$cat})}" title="{$current_cat[{$cat}]['name']}">{$current_cat[{$cat}]['name']}</a></li>
	{/if}
  {/foreach}
</ul>

 

This has worked for me:

It's Category::getCategoryInformation(array($cat))} not "getCategoryInformations(...)"

<ul class="productcats">
{foreach from=Product::getProductCategories($product.id) item=cat}
{if $cat > 2}
{assign var='current_cat' value=Category::getCategoryInformation(array($cat))}
<li><a href="{$link->getCategoryLink({$cat})}" title="{$current_cat[{$cat}]['name']}">{$current_cat[{$cat}]['name']}</a></li>
{/if}
{/foreach}
</ul>

 

×
×
  • Create New...