[Skip to main content](#vessel-content)

#   how to display category of product?

##

- **[ronron](/forum/user/40399-ronron "View ronron's Profile")**
- [![ronron's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/bad_baby.jpg)](/forum/user/40399-ronron "View ronron's Profile") Topic Author
- [ Offline](/forum/user/40399-ronron)

Less More

- Posts: 490
- Thank you received: 2
-
-

10 years 4 months ago [\#244039](#244039) by [ronron](/forum/user/40399-ronron "View ronron's Profile")  *[how to display category of product?](/forum/4-how-to/885271-how-to-display-category-of-product#244039 "-- HikaShop version -- : 2.6.3 -- 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")* was created by *[ronron](/forum/user/40399-ronron "View ronron's Profile")*

-- HikaShop version -- : 2.6.3
-- 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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NTI3MS1ob3ctdG8tZGlzcGxheS1jYXRlZ29yeS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

10 years 4 months ago [\#244047](#244047) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[how to display category of product?](/forum/4-how-to/885271-how-to-display-category-of-product#244047 "-- HikaShop version -- : 2.6.3 -- 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")*

Hello,

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](http://www.hikashop.com/support/documentation/308-hikashop-content-display-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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NTI3MS1ob3ctdG8tZGlzcGxheS1jYXRlZ29yeS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[ronron](/forum/user/40399-ronron "View ronron's Profile")**
- [![ronron's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/bad_baby.jpg)](/forum/user/40399-ronron "View ronron's Profile") Topic Author
- [ Offline](/forum/user/40399-ronron)

Less More

- Posts: 490
- Thank you received: 2
-
-

10 years 4 months ago [\#244127](#244127) by [ronron](/forum/user/40399-ronron "View ronron's Profile")  Replied by *[ronron](/forum/user/40399-ronron "View ronron's Profile")* on topic *[how to display category of product?](/forum/4-how-to/885271-how-to-display-category-of-product#244127 "-- HikaShop version -- : 2.6.3 -- 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")*

how do i add it to the product description?

what is the code?

thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NTI3MS1ob3ctdG8tZGlzcGxheS1jYXRlZ29yeS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")**
- [![kyratn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/redswirl.jpg)](/forum/user/38342-kyratn "View kyratn's Profile")
- [ Offline](/forum/user/38342-kyratn)

Less More

- Posts: 1119
- Thank you received: 114
-
- [](http://kyra.lt)
-

10 years 4 months ago -  10 years 4 months ago [\#244153](#244153) by [kyratn](/forum/user/38342-kyratn "View kyratn's Profile")  Replied by *[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")* on topic *[how to display category of product?](/forum/4-how-to/885271-how-to-display-category-of-product#244153 "-- HikaShop version -- : 2.6.3 -- 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")*

Hi,

If you want to show product categories/category name on product page you can add something like this to product -&gt;show_default view file.
Code:

&lt;?php $q = 'SELECT c.* '. ' FROM ' . hikashop_table('product_category').' as pc '. ' INNER JOIN '.hikashop_table('category').' AS c ON pc.category_id = c.category_id '. ' WHERE pc.product_id = '.hikashop_getCID('product_id'); $database-&gt;setQuery($q); $product_categories = $database-&gt;loadObjectList(); $categories = array(); if($product_categories) { ?&gt; &lt;div class=" gray-italic"&gt; &lt;span class=" margin-reset"&gt;&lt;?php echo JText::_('CUSTOM_ITEM_PRODUCT_CATEGORIES'); ?&gt; :&lt;/span&gt; &lt;?php foreach ($product_categories as $category) $categories[] = $category-&gt;category_name; foreach($categories as $c) $c = '&lt;span class="pull-left margin-reset"&gt;'.$c.'&lt;/span&gt;'; echo implode(', ', $categories); ?&gt;

Please note that you should modify this code to your needs.

I hope this is what you are looking for?

Thanks

Last edit: 10 years 4 months ago by [kyratn](/forum/user/38342-kyratn "View kyratn's Profile").

The following user(s) said Thank You: [ronron](/forum/user/40399-ronron "View ronron's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NTI3MS1ob3ctdG8tZGlzcGxheS1jYXRlZ29yeS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 654
-
-

10 years 4 months ago -  10 years 4 months ago [\#244150](#244150) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[how to display category of product?](/forum/4-how-to/885271-how-to-display-category-of-product#244150 "-- HikaShop version -- : 2.6.3 -- 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")*

Hello,

I think Mohamed speak about add in your product description part, more precisely here :

[ ![description.png](/forum/attachment/32334) ](/forum/attachment/32334 "description.png")

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

foreach ($this-&gt;categories as $key =&gt; $value) { ?&gt; &lt;div id="hikashop_product_category_&lt;?php echo $value-&gt;category_id ?&gt;"&gt; &lt;?php echo $value-&gt;category_name ?&gt; &lt;/div&gt; &lt;?php }

Hope this will help you.

Regards

- [ ![description.png](/forum/attachment/32334) ](/forum/attachment/32334 "description.png") [ ](/forum/attachment/32334?download=1 "description.png")

Last edit: 10 years 4 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

The following user(s) said Thank You: [ronron](/forum/user/40399-ronron "View ronron's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NTI3MS1ob3ctdG8tZGlzcGxheS1jYXRlZ29yeS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[gerryna09](/forum/user/52735-gerryna09 "View gerryna09's Profile")**
- [![gerryna09's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/52735-gerryna09 "View gerryna09's Profile")
- [ Offline](/forum/user/52735-gerryna09)

Less More

- Posts: 152
- Thank you received: 11
-
-

5 years 1 month ago [\#335683](#335683) by [gerryna09](/forum/user/52735-gerryna09 "View gerryna09's Profile")  Replied by *[gerryna09](/forum/user/52735-gerryna09 "View gerryna09's Profile")* on topic *[how to display category of product?](/forum/4-how-to/885271-how-to-display-category-of-product#335683 "-- HikaShop version -- : 2.6.3 -- 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")*

What if I want to see ONLY categories with the same category_parent_id ??

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NTI3MS1ob3ctdG8tZGlzcGxheS1jYXRlZ29yeS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

5 years 1 month ago [\#335691](#335691) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[how to display category of product?](/forum/4-how-to/885271-how-to-display-category-of-product#335691 "-- HikaShop version -- : 2.6.3 -- 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")*

Hi,

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NTI3MS1ob3ctdG8tZGlzcGxheS1jYXRlZ29yeS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[gerryna09](/forum/user/52735-gerryna09 "View gerryna09's Profile")**
- [![gerryna09's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/52735-gerryna09 "View gerryna09's Profile")
- [ Offline](/forum/user/52735-gerryna09)

Less More

- Posts: 152
- Thank you received: 11
-
-

5 years 1 month ago [\#335708](#335708) by [gerryna09](/forum/user/52735-gerryna09 "View gerryna09's Profile")  Replied by *[gerryna09](/forum/user/52735-gerryna09 "View gerryna09's Profile")* on topic *[how to display category of product?](/forum/4-how-to/885271-how-to-display-category-of-product#335708 "-- HikaShop version -- : 2.6.3 -- 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")*

[ ![aaaaaaaaaaaa.jpg](/forum/attachment/53550) ](/forum/attachment/53550 "aaaaaaaaaaaa.jpg")

- [ ![aaaaaaaaaaaa.jpg](/forum/attachment/53550) ](/forum/attachment/53550 "aaaaaaaaaaaa.jpg") [ ](/forum/attachment/53550?download=1 "aaaaaaaaaaaa.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NTI3MS1ob3ctdG8tZGlzcGxheS1jYXRlZ29yeS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

5 years 1 month ago [\#335725](#335725) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[how to display category of product?](/forum/4-how-to/885271-how-to-display-category-of-product#335725 "-- HikaShop version -- : 2.6.3 -- 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")*

Hi,

Ok, that's much more clear.
So what you could do is add the code: Code:

if($value-&gt;category_parent_id != xx) continue;

before the first ?&gt; in your custom code. Make sure you replace xx with the id of the "Badges &amp; discounts" category.
That way, your code won't display the children categories of that "Badges &amp; discounts" category.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NTI3MS1ob3ctdG8tZGlzcGxheS1jYXRlZ29yeS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[gerryna09](/forum/user/52735-gerryna09 "View gerryna09's Profile")**
- [![gerryna09's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/52735-gerryna09 "View gerryna09's Profile")
- [ Offline](/forum/user/52735-gerryna09)

Less More

- Posts: 152
- Thank you received: 11
-
-

5 years 1 month ago [\#335728](#335728) by [gerryna09](/forum/user/52735-gerryna09 "View gerryna09's Profile")  Replied by *[gerryna09](/forum/user/52735-gerryna09 "View gerryna09's Profile")* on topic *[how to display category of product?](/forum/4-how-to/885271-how-to-display-category-of-product#335728 "-- HikaShop version -- : 2.6.3 -- 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")*

Thank you Nicolas for creating HikaShop and thank you for the assistance you give us ![:)](/media/kunena/emoticons/3.png ":)")

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile"), [Philip](/forum/user/34318-philip "View Philip's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NTI3MS1ob3ctdG8tZGlzcGxheS1jYXRlZ29yeS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Thrane](/forum/user/31786-thrane "View Thrane's Profile")**
- [![Thrane's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31786-thrane "View Thrane's Profile")
- [ Offline](/forum/user/31786-thrane)

Less More

- Posts: 366
- Thank you received: 26
-
-

4 years 11 months ago [\#337192](#337192) by [Thrane](/forum/user/31786-thrane "View Thrane's Profile")  Replied by *[Thrane](/forum/user/31786-thrane "View Thrane's Profile")* on topic *[how to display category of product?](/forum/4-how-to/885271-how-to-display-category-of-product#337192 "-- HikaShop version -- : 2.6.3 -- 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")*

> nicolas wrote: Hi,
>
> Ok, that's much more clear.
> So what you could do is add the code:
>
> Code:
>
> if($value-&gt;category_parent_id != xx) continue;
>
>
>
> before the first ?&gt; in your custom code. Make sure you replace xx with the id of the "Badges &amp; discounts" category.
> That way, your code won't display the children categories of that "Badges &amp; discounts" category.

Hi, hope it's ok to ask here, since it's about this code!

I have insert Code:

&lt;?php foreach ($this-&gt;categories as $key =&gt; $value) { if($value-&gt;category_parent_id != 140) continue; ?&gt; &lt;div id="hikashop_product_category_&lt;?php echo $value-&gt;category_id ?&gt;"&gt; &lt;?php echo $value-&gt;category_name ?&gt; &lt;/div&gt; &lt;?php } ?&gt;

But now I ONLY see the categories from the parent with ID 140?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NTI3MS1ob3ctdG8tZGlzcGxheS1jYXRlZ29yeS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

4 years 11 months ago [\#337213](#337213) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[how to display category of product?](/forum/4-how-to/885271-how-to-display-category-of-product#337213 "-- HikaShop version -- : 2.6.3 -- 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")*

Hi,

My bad it should be == instead of != in the code I gave.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NTI3MS1ob3ctdG8tZGlzcGxheS1jYXRlZ29yeS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Thrane](/forum/user/31786-thrane "View Thrane's Profile")**
- [![Thrane's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31786-thrane "View Thrane's Profile")
- [ Offline](/forum/user/31786-thrane)

Less More

- Posts: 366
- Thank you received: 26
-
-

4 years 11 months ago [\#337216](#337216) by [Thrane](/forum/user/31786-thrane "View Thrane's Profile")  Replied by *[Thrane](/forum/user/31786-thrane "View Thrane's Profile")* on topic *[how to display category of product?](/forum/4-how-to/885271-how-to-display-category-of-product#337216 "-- HikaShop version -- : 2.6.3 -- 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")*

Thank you ![:-)](/media/kunena/emoticons/3.png ":-)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NTI3MS1ob3ctdG8tZGlzcGxheS1jYXRlZ29yeS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Thrane](/forum/user/31786-thrane "View Thrane's Profile")**
- [![Thrane's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31786-thrane "View Thrane's Profile")
- [ Offline](/forum/user/31786-thrane)

Less More

- Posts: 366
- Thank you received: 26
-
-

4 years 11 months ago [\#337218](#337218) by [Thrane](/forum/user/31786-thrane "View Thrane's Profile")  Replied by *[Thrane](/forum/user/31786-thrane "View Thrane's Profile")* on topic *[how to display category of product?](/forum/4-how-to/885271-how-to-display-category-of-product#337218 "-- HikaShop version -- : 2.6.3 -- 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")*

Would it be possible to have these categories linking to a listing?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NTI3MS1ob3ctdG8tZGlzcGxheS1jYXRlZ29yeS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Thrane](/forum/user/31786-thrane "View Thrane's Profile")**
- [![Thrane's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31786-thrane "View Thrane's Profile")
- [ Offline](/forum/user/31786-thrane)

Less More

- Posts: 366
- Thank you received: 26
-
-

4 years 11 months ago [\#337219](#337219) by [Thrane](/forum/user/31786-thrane "View Thrane's Profile")  Replied by *[Thrane](/forum/user/31786-thrane "View Thrane's Profile")* on topic *[how to display category of product?](/forum/4-how-to/885271-how-to-display-category-of-product#337219 "-- HikaShop version -- : 2.6.3 -- 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")*

Just found a solution ...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NTI3MS1ob3ctdG8tZGlzcGxheS1jYXRlZ29yeS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")**
- [![dvddvd's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/7721-dvddvd "View dvddvd's Profile")
- [ Offline](/forum/user/7721-dvddvd)

Less More

- Posts: 267
- Thank you received: 5
-
-
-
-

2 years 7 months ago [\#359661](#359661) by [dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")  Replied by *[dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")* on topic *[how to display category of product?](/forum/4-how-to/885271-how-to-display-category-of-product#359661 "-- HikaShop version -- : 2.6.3 -- 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")*

Hi

Is it possible to also show the category image?

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NTI3MS1ob3ctdG8tZGlzcGxheS1jYXRlZ29yeS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 654
-
-

2 years 7 months ago [\#359665](#359665) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[how to display category of product?](/forum/4-how-to/885271-how-to-display-category-of-product#359665 "-- HikaShop version -- : 2.6.3 -- 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")*

Hello,

Please can you precise where you want to display precisely your category image?
Regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NTI3MS1ob3ctdG8tZGlzcGxheS1jYXRlZ29yeS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")**
- [![dvddvd's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/7721-dvddvd "View dvddvd's Profile")
- [ Offline](/forum/user/7721-dvddvd)

Less More

- Posts: 267
- Thank you received: 5
-
-
-
-

2 years 7 months ago [\#359698](#359698) by [dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")  Replied by *[dvddvd](/forum/user/7721-dvddvd "View dvddvd's Profile")* on topic *[how to display category of product?](/forum/4-how-to/885271-how-to-display-category-of-product#359698 "-- HikaShop version -- : 2.6.3 -- 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")*

Hello Philip,

I would like it to appear in the product view.

thank you so much

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NTI3MS1ob3ctdG8tZGlzcGxheS1jYXRlZ29yeS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

2 years 7 months ago [\#359699](#359699) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[how to display category of product?](/forum/4-how-to/885271-how-to-display-category-of-product#359699 "-- HikaShop version -- : 2.6.3 -- 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")*

Hi,

You would have to use such code : Code:

... $categoryClass = hikashop_get('class.category'); $image_options = array('default' =&gt; true,'forcesize'=&gt;$this-&gt;config-&gt;get('image_force_size',true),'scale'=&gt;$this-&gt;config-&gt;get('image_scale_mode','inside')); foreach ($this-&gt;categories as $key =&gt; $value) { $data = $categoryClass-&gt;get($value-&gt;category_id, true); $img = $this-&gt;image-&gt;getThumbnail($data-&gt;file_path, array('width' =&gt; 100 'height' =&gt; 100), $image_options); if(@$img-&gt;success) { echo '&lt;img title="'.$this-&gt;escape((string)@$data-&gt;file_description).'" alt="'.$this-&gt;escape((string)@$data-&gt;file_name).'" src="'.$img-&gt;url.'"/&gt;'; } } ...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg4NTI3MS1ob3ctdG8tZGlzcGxheS1jYXRlZ29yeS1vZi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.123 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
