Jump to content

Get list of categories in product page


Recommended Posts

Hello!

 

Is there any way of getting the list of categories of a product in its own product's page?

 

In product's page you can only get its default category, but not the list of categories that the product belongs to.

 

Thank you in advance.

Link to comment
Share on other sites

Got it

 

 

{assign var='categories' value=Product::getProductCategoriesFull($product->id, $cookie->id_lang)}

{foreach from=$categories key='categoryId' item='category' name='categories'}

Category ID: {$categoryId}<br />

Name: {$category['name']}<br />

Link rewrite: {$category['link_rewrite']}

{/foreach}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...