Jump to content

Adding category and category description on product page


Recommended Posts

Hi there,

First post, i'm new here in Prestashop :)

I'm making my first template, modifying the default boostrap with no problems so far.

This is the first thing that i stumbled upon that i can't quite figure out. 

I need to put the category of a product, and the category description, in a product page. so you reach the product, read the description, features, attributes etc and at the bottom you have information about the category.

I'm not a PHP programmer but i modified the product.tpl files to modify certain sections without problem. the thing is, i don't know how to access the data that shows the category information for a product. 

I searched A LOT in this forum, also the designer and developer's guide and no luck.

so, anyone?

Thanks!

 

Ezequiel

Link to comment
Share on other sites

Ok, i discovered how to do that, and it's pretty simple:

<h3>{$category->name}</h3>
<p>{$category->description}</p>

The problem is that that's not what i originally needed.

The site has two main categories, "types of tea" and "essences of tea" (it's a tea shop) and all the teas have a different "type" and "essence", so two separate independent categories for each product. 
i need to show the "essence" category, not the main one! that's type. how do i access to the "alternate" categories of a product?
Edited by enparticular (see edit history)
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...