Jump to content

Add parent category below product name


Recommended Posts

Hi everybody,

 

I really need your help to solve this. In product page, as well as in product list page, I need to display the parent category of the product. This is what I mean:

 

Now I have (in product page):

 

Product name

Product description_short

 

I would like to have:

 

Product parent category

Product name

Product description_short

 

Any help is really appreciated.

 

Luca.

Share this post


Link to post
Share on other sites

I found the answer for the product page: eureka!!

 

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

 

But when I use the same code line on the product list (generated after search bar research), it doesn't show me the parent category, but the category that has been used to sort the products.

 

Some ideas mates?

 

Thank you very much and hello from sunny Italy! ;-)

 

Luca.

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