View Single Post
  #5  
Old 03-18-2022, 10:45 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,050
 

Default Re: how to get a product root category name?

You could get it from the breadcrumb...
Code:
{foreach $location item=l name=location} {assign var="total" value=$l@total} {if $l@index eq $total - 2} {assign var="root_category" value=$l.0|amp} {/if} {/foreach} {if $root_category}{$root_category}{/if}
Reply With Quote