Jump to content

Product categories and subcategories

Recommended Posts

On product page I want to display all categories and subcategories to which the product is assigned. Something like this:
-Category 1
-Category 2

My current code is:

					{foreach from=$product_categories item=product_category}
						{if $product_category.id_category != 2}
							<li >
								<a href="{$link->getCategoryLink($product_category.id_category, $product_category.link_rewrite)}"

But its print all categories in every line without category tree.

Share this post

Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More