Jump to content

How to add category on the product display hook


interacom
 Share

Recommended Posts

Ciao Ndiaga. thanks for your solution, but i have seen the module manutìfacturer logo. it s hard coded for me. If there is an easier way it s better. if you can help, i thank a lot

i do not know if i replace manufacterlogo id and name with d_category_default and the name of the category using your module it will works well .

Share this post


Link to post
Share on other sites

This module is just an inspiration but you can get id_category_default from the template file:  product-list.tpl

this way:



{assign var=id_category_default value=$product.id_category_default}

{assign var=cat  value=new Category({id_category_default})}

//and then you can use it

{$cat->name[Tools::getValue('id_lang')]}  // because {$cat->name} is an array

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
 Share

×
×
  • Create New...

Important Information

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