Check programatically if product is in a category

  • Posts: 5
  • Thank you received: 0
11 years 9 months ago #124072

I am making changes on the product page and already have the $product object. It doesnt have any value inside that denotes category. How do I find out if a certain product is in a certain category, and get the category id?

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 9 months ago #124085

Hi,

You'll be able to get it by editing your "show default" file of the product view of your front-end template through "Hikashop->Display->Views", and by using this variable :

$this->element->category_id

Last edit: 11 years 9 months ago by Mohamed Thelji.

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum