Jump to content

How to display products parent category name in Home Featured module?


ufikas

Recommended Posts

Hello,
i need a very simple tweek to standard Home featured module (presta 1.3.7) - i need to display parent category of the product.
I only found way to get default category with $product.category_default, but is there a way to get parent category?
I have some knowledge of php and i'm familiar with smarty so don't hestitate to tell me where and what to edit.

Thank you in advance.

Link to comment
Share on other sites

Hello,
i need a very simple tweek to standard Home featured module (presta 1.3.7) - i need to display parent category of the product.
I only found way to get default category with $product.category_default, but is there a way to get parent category?
I have some knowledge of php and i'm familiar with smarty so don't hestitate to tell me where and what to edit.

Thank you in advance.



have u ever searched on any admin files that could contain a call to to parents category?


tahe a look in here
Link to comment
Share on other sites

Thank you for the reply.
Actually i've searched both back end and front end for such function and found none.
If you take a look at class/product..php it looks like that there is no parent category variable in products array returned by global function. Only default category...
So i guess i need to call global category function, then get parent id of product category and the get parent category name by ID. Ew...

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...