Jump to content

Showing root category image in all underlying categories and products


Recommended Posts

Hi all, PrestaShop noob here. (version 1.5.2.0)

 

I am trying to show the root category image in the header of my templates for all pages within the catalog (including product pages), but I guess I am stuck. I have played around with {$path} and {$product->id_category_default} but I see no way to extract the root from them.

 

I'm hoping to avoid using PHP if at all possible. All I really need is the id of the root category of the current product or subcategory. Does anyone know if there is a way to check the path to root and find the first item with available variables in smarty?

 

(Btw. is there a list of all smarty variables in PrestaShop available, apart from the debug console?)

Link to comment
Share on other sites

  • 2 weeks later...

Edit: I ended my search concluding this is not possible within current Smarty options. I suspect this would require some PHP and a DB query to search the return path to the root. To complicated to be economical for me at this moment. Let's call this a feature request :)

 

Still.. there might be possibilities within the variables used in the blockcategories module...

Link to comment
Share on other sites

  • 3 months later...

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