Skip to main content

Check programatically if product is in a category

More
13 years 2 weeks ago #124072 by piggyslasher
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.

More
13 years 2 weeks ago - 13 years 2 weeks ago #124085 by Mohamed Thelji
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 :
Code:
$this->element->category_id
Last edit: 13 years 2 weeks ago by Mohamed Thelji.

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

Time to create page: 0.142 seconds
Powered by Kunena Forum