- Posts: 490
- Thank you received: 2
how to display category of product?
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.5
-- Error-message(debug-mod must be tuned on) -- : none
hi guys
how can i display the product category on the product page?
thanks
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
If you want to display a listing of categories, you can use an Hikashop category listing menu / module :
www.hikashop.com/support/documentation/3...splay-front-end.html
Else if you want to display it through your product page, you can actually add it through your product description.
Please Log in or Create an account to join the conversation.
what is the code?
thanks
Please Log in or Create an account to join the conversation.
If you want to show product categories/category name on product page you can add something like this to product ->show_default view file.
Please note that you should modify this code to your needs.
I hope this is what you are looking for?
Thanks
Please Log in or Create an account to join the conversation.
I think Mohamed speak about add in your product description part, more precisely here :
In order to go more far your custom your product/show.php, view and add where needed this code in order to display your product category.
Hope this will help you.
Regards
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
We're talking here about displaying the categories directly linked to the current product, on the product details page.
A product doesn't have a category_parent_id so I don't see what you mean ?
Or are you talking about displaying a listing of the categories with the same parent as the categories linked to the product ? There is no easy way to do that. That would require some development to be able to do that. However, I don't see the point of doing that, so maybe you're talking about something else entirely ?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Ok, that's much more clear.
So what you could do is add the code:
That way, your code won't display the children categories of that "Badges & discounts" category.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
nicolas wrote: Hi,
Ok, that's much more clear.
So what you could do is add the code:before the first ?> in your custom code. Make sure you replace xx with the id of the "Badges & discounts" category.Code:if($value->category_parent_id != xx) continue;
That way, your code won't display the children categories of that "Badges & discounts" category.
Hi, hope it's ok to ask here, since it's about this code!
I have insert
But now I ONLY see the categories from the parent with ID 140?
Please Log in or Create an account to join the conversation.
My bad it should be == instead of != in the code I gave.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Is it possible to also show the category image?
Thanks
Please Log in or Create an account to join the conversation.
Please can you precise where you want to display precisely your category image?
Regards
Please Log in or Create an account to join the conversation.
I would like it to appear in the product view.
thank you so much
Please Log in or Create an account to join the conversation.
You would have to use such code :
Please Log in or Create an account to join the conversation.