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

#   Category Names added to Products pages

##

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

Less More

- Posts: 28
- Thank you received: 1
-
-

14 years 1 month ago -  14 years 1 month ago [\#64957](#64957) by [big5hot](/forum/user/5666-big5hot "View big5hot's Profile")  *[Category Names added to Products pages](/forum/4-how-to/64957-category-names-added-to-products-pages#64957 "Hi HikaShop Support..  Im sure I had this figured out before, but seem to lost where to add this.  I would like to have the Category names automatically added to each Product page so customers can see that they are in a &quot;certain category of products&quot;. (Enclosed: a sample of what im talking about)  Example: when customer clicks on &quot;amino acids category&quot; ... all amino acids products apear under the heading &quot;Amino Acids&quot;.  Thanks again guyz... appreciate your time and work..!  Also, awaiting 1.6.0 and the &quot;badges&quot; to come around. section for hikashop!......hikashop is amazing.. !!  Big5hot   www.tsn.sportsnutrition.com")* was created by *[big5hot](/forum/user/5666-big5hot "View big5hot's Profile")*

Hi HikaShop Support..

Im sure I had this figured out before, but seem to lost where to add this.

I would like to have the Category names automatically added to each Product page so customers can see that they are in a "certain category of products". (Enclosed: a sample of what im talking about)

Example: when customer clicks on "amino acids category" ... all amino acids products apear under the heading "Amino Acids".

Thanks again guyz... appreciate your time and work..!

Also, awaiting 1.6.0 and the "badges" to come around. section for hikashop!......hikashop is amazing.. !!

Big5hot [ www.tsn.sportsnutrition.com](http://www.tsn.sportsnutrition.com)

- [ ![category&#95;descriptions&#95;to&#95;products2.jpg](/forum/attachment/5679) ](/forum/attachment/5679 "...&#95;products2.jpg") [ ](/forum/attachment/5679?download=1 "...&#95;products2.jpg")

Last edit: 14 years 1 month ago by [big5hot](/forum/user/5666-big5hot "View big5hot's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY0OTU3LWNhdGVnb3J5LW5hbWVzLWFkZGVkLXRvLXByb2R1Y3RzLXBhZ2VzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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
-
-
-

14 years 1 month ago [\#65019](#65019) 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 *[Re: Category Names added to Products pages](/forum/4-how-to/64957-category-names-added-to-products-pages#65019 "Hi HikaShop Support..  Im sure I had this figured out before, but seem to lost where to add this.  I would like to have the Category names automatically added to each Product page so customers can see that they are in a &quot;certain category of products&quot;. (Enclosed: a sample of what im talking about)  Example: when customer clicks on &quot;amino acids category&quot; ... all amino acids products apear under the heading &quot;Amino Acids&quot;.  Thanks again guyz... appreciate your time and work..!  Also, awaiting 1.6.0 and the &quot;badges&quot; to come around. section for hikashop!......hikashop is amazing.. !!  Big5hot   www.tsn.sportsnutrition.com")*

Hi,

I think that you'll have to :
- Go to "*Hikashop-&gt;Display-&gt;Views*"
- Edit the "listing_img_title" file of the "product view" of the front-end's template that you are currently using
- Add this code : Code:

$productClass=hikashop_get('class.product'); $categories=$productClass-&gt;getCategories($this-&gt;row-&gt;product_id); $database =&amp; JFactory::getDBO(); $query = 'SELECT * from '.hikashop_table('category').' WHERE category_id IN ('.implode($categories, ',').')'; $database-&gt;setQuery($query); $categories =$database-&gt;loadObjectList(); foreach($categories as $category){ echo $category-&gt;category_name.'&lt;br/&gt;'; }

Hope this will help you.

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY0OTU3LWNhdGVnb3J5LW5hbWVzLWFkZGVkLXRvLXByb2R1Y3RzLXBhZ2VzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 28
- Thank you received: 1
-
-

14 years 1 month ago [\#65197](#65197) by [big5hot](/forum/user/5666-big5hot "View big5hot's Profile")  Replied by *[big5hot](/forum/user/5666-big5hot "View big5hot's Profile")* on topic *[Re: Category Names added to Products pages](/forum/4-how-to/64957-category-names-added-to-products-pages#65197 "Hi HikaShop Support..  Im sure I had this figured out before, but seem to lost where to add this.  I would like to have the Category names automatically added to each Product page so customers can see that they are in a &quot;certain category of products&quot;. (Enclosed: a sample of what im talking about)  Example: when customer clicks on &quot;amino acids category&quot; ... all amino acids products apear under the heading &quot;Amino Acids&quot;.  Thanks again guyz... appreciate your time and work..!  Also, awaiting 1.6.0 and the &quot;badges&quot; to come around. section for hikashop!......hikashop is amazing.. !!  Big5hot   www.tsn.sportsnutrition.com")*

Hi Mohamed,

Is there a specific place/position i should insert this "code" ?. I am not very knowledgeable when it comes to code. I found the file and inserted it, but nothing happened.

Need a little more help with this one....THanks!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY0OTU3LWNhdGVnb3J5LW5hbWVzLWFkZGVkLXRvLXByb2R1Y3RzLXBhZ2VzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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
-
-
-

14 years 1 month ago [\#65212](#65212) 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 *[Re: Category Names added to Products pages](/forum/4-how-to/64957-category-names-added-to-products-pages#65212 "Hi HikaShop Support..  Im sure I had this figured out before, but seem to lost where to add this.  I would like to have the Category names automatically added to each Product page so customers can see that they are in a &quot;certain category of products&quot;. (Enclosed: a sample of what im talking about)  Example: when customer clicks on &quot;amino acids category&quot; ... all amino acids products apear under the heading &quot;Amino Acids&quot;.  Thanks again guyz... appreciate your time and work..!  Also, awaiting 1.6.0 and the &quot;badges&quot; to come around. section for hikashop!......hikashop is amazing.. !!  Big5hot   www.tsn.sportsnutrition.com")*

Hi,

Sorry I misunderstood your question you should :
- Go to "Hikashop-&gt;Display-&gt;Views"
- Edit the "show_default" file of the "product" view of the front-end's template that you are currently using
- Add this code : Code:

&lt;?php foreach($this-&gt;categories as $category){ echo ($category-&gt;category_name).' - '; } ?&gt;

after Code:

&lt;div id="hikashop_product_top_part" class="hikashop_product_top_part"&gt;

Hope this will help you.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY0OTU3LWNhdGVnb3J5LW5hbWVzLWFkZGVkLXRvLXByb2R1Y3RzLXBhZ2VzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 28
- Thank you received: 1
-
-

14 years 1 month ago -  14 years 1 month ago [\#65379](#65379) by [big5hot](/forum/user/5666-big5hot "View big5hot's Profile")  Replied by *[big5hot](/forum/user/5666-big5hot "View big5hot's Profile")* on topic *[Re: Category Names added to Products pages](/forum/4-how-to/64957-category-names-added-to-products-pages#65379 "Hi HikaShop Support..  Im sure I had this figured out before, but seem to lost where to add this.  I would like to have the Category names automatically added to each Product page so customers can see that they are in a &quot;certain category of products&quot;. (Enclosed: a sample of what im talking about)  Example: when customer clicks on &quot;amino acids category&quot; ... all amino acids products apear under the heading &quot;Amino Acids&quot;.  Thanks again guyz... appreciate your time and work..!  Also, awaiting 1.6.0 and the &quot;badges&quot; to come around. section for hikashop!......hikashop is amazing.. !!  Big5hot   www.tsn.sportsnutrition.com")*

Hi Mohamed,

THanks for your help but im still not able to achieve my goal. Maybe I have not explained clear enough, and im sorry for that.

There are 3 pages, (1)category (2)products in category (3)products that are highlighted

I would like to display a category text in the "(2)products in category" page and not in (3).

I added the code that you gave me and it added a category text in #(3). - See Attached pics

[ www.tsnsportsnutrition.com](http://www.tsnsportsnutrition.com)

I really appreciate you taking the time in helping me. Sorry if I was not clear...

Big5hot
_______________
UPDATE:

Hi Mohamed..

After playing with the many controls, I may have stumbled on the SOLUTION. I Hide the Menu and the category title for each category appeared. Im not sure if that was the reason, but as you can see, the issue is resolved.

THANKS = Mohamed for your time and efforts... again. (PROBLEM SOLVED,)

Big5hot

- [ ![1&#95;tsn&#95;store&#95;categories.jpg](/forum/attachment/5734) ](/forum/attachment/5734 "...categories.jpg") [ ](/forum/attachment/5734?download=1 "...categories.jpg")
- [ ![2&#95;products&#95;page.jpg](/forum/attachment/5735) ](/forum/attachment/5735 "...ducts&#95;page.jpg") [ ](/forum/attachment/5735?download=1 "...ducts&#95;page.jpg")
- [ ![3&#95;product&#95;highlight&#95;page.jpg](/forum/attachment/5736) ](/forum/attachment/5736 "...light&#95;page.jpg") [ ](/forum/attachment/5736?download=1 "...light&#95;page.jpg")
- [ ![Category&#95;Title&#95;on&#95;product&#95;page.jpg](/forum/attachment/5737) ](/forum/attachment/5737 "...oduct&#95;page.jpg") [ ](/forum/attachment/5737?download=1 "...oduct&#95;page.jpg")

Last edit: 14 years 1 month ago by [big5hot](/forum/user/5666-big5hot "View big5hot's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY0OTU3LWNhdGVnb3J5LW5hbWVzLWFkZGVkLXRvLXByb2R1Y3RzLXBhZ2VzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 5 months ago [\#156195](#156195) by [rada88496](/forum/user/32070-rada88496 "View rada88496's Profile")  Replied by *[rada88496](/forum/user/32070-rada88496 "View rada88496's Profile")* on topic *[Re: Category Names added to Products pages](/forum/4-how-to/64957-category-names-added-to-products-pages#156195 "Hi HikaShop Support..  Im sure I had this figured out before, but seem to lost where to add this.  I would like to have the Category names automatically added to each Product page so customers can see that they are in a &quot;certain category of products&quot;. (Enclosed: a sample of what im talking about)  Example: when customer clicks on &quot;amino acids category&quot; ... all amino acids products apear under the heading &quot;Amino Acids&quot;.  Thanks again guyz... appreciate your time and work..!  Also, awaiting 1.6.0 and the &quot;badges&quot; to come around. section for hikashop!......hikashop is amazing.. !!  Big5hot   www.tsn.sportsnutrition.com")*

Hi,
I used this code to display category on product page, but I would like to display parent category/s too. Trying to figure it out I could use some help :blush:

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY0OTU3LWNhdGVnb3J5LW5hbWVzLWFkZGVkLXRvLXByb2R1Y3RzLXBhZ2VzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14264
-
-

12 years 5 months ago [\#156209](#156209) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Category Names added to Products pages](/forum/4-how-to/64957-category-names-added-to-products-pages#156209 "Hi HikaShop Support..  Im sure I had this figured out before, but seem to lost where to add this.  I would like to have the Category names automatically added to each Product page so customers can see that they are in a &quot;certain category of products&quot;. (Enclosed: a sample of what im talking about)  Example: when customer clicks on &quot;amino acids category&quot; ... all amino acids products apear under the heading &quot;Amino Acids&quot;.  Thanks again guyz... appreciate your time and work..!  Also, awaiting 1.6.0 and the &quot;badges&quot; to come around. section for hikashop!......hikashop is amazing.. !!  Big5hot   www.tsn.sportsnutrition.com")*

To get the parent categories of a category, you can use such code: Code:

$categoryClass=hikashop_get('class.category'); $parents = $categoryClass-&gt;getParents($category_id); foreach($parents as $parent){ echo $parent-&gt;category_name; }

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY0OTU3LWNhdGVnb3J5LW5hbWVzLWFkZGVkLXRvLXByb2R1Y3RzLXBhZ2VzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 5 months ago [\#156236](#156236) by [rada88496](/forum/user/32070-rada88496 "View rada88496's Profile")  Replied by *[rada88496](/forum/user/32070-rada88496 "View rada88496's Profile")* on topic *[Re: Category Names added to Products pages](/forum/4-how-to/64957-category-names-added-to-products-pages#156236 "Hi HikaShop Support..  Im sure I had this figured out before, but seem to lost where to add this.  I would like to have the Category names automatically added to each Product page so customers can see that they are in a &quot;certain category of products&quot;. (Enclosed: a sample of what im talking about)  Example: when customer clicks on &quot;amino acids category&quot; ... all amino acids products apear under the heading &quot;Amino Acids&quot;.  Thanks again guyz... appreciate your time and work..!  Also, awaiting 1.6.0 and the &quot;badges&quot; to come around. section for hikashop!......hikashop is amazing.. !!  Big5hot   www.tsn.sportsnutrition.com")*

I tried the code and I m getting
Undefined variable: category_id in C:\xampp\htdocs\...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY0OTU3LWNhdGVnb3J5LW5hbWVzLWFkZGVkLXRvLXByb2R1Y3RzLXBhZ2VzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14264
-
-

12 years 5 months ago [\#156251](#156251) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Category Names added to Products pages](/forum/4-how-to/64957-category-names-added-to-products-pages#156251 "Hi HikaShop Support..  Im sure I had this figured out before, but seem to lost where to add this.  I would like to have the Category names automatically added to each Product page so customers can see that they are in a &quot;certain category of products&quot;. (Enclosed: a sample of what im talking about)  Example: when customer clicks on &quot;amino acids category&quot; ... all amino acids products apear under the heading &quot;Amino Acids&quot;.  Thanks again guyz... appreciate your time and work..!  Also, awaiting 1.6.0 and the &quot;badges&quot; to come around. section for hikashop!......hikashop is amazing.. !!  Big5hot   www.tsn.sportsnutrition.com")*

Yes that's normal if you just copy/pasted the code I gave.
The code I gave will display the name of all the parents of the category with its id set in the $category_id. If you don't set any $category_id before that code with the id of the category for which you want to display the parents, it won't be able to work properly.

For example, you can add your code inside the categories foreach like this
foreach($this-&gt;categories as $category){
$category_id = $category-&gt;category_id;
//code from my previous message
}

Please understand that the support we provide here is about the use of HikaShop, not to code for you your customizations, although we try to help when it's not too complex. I would recommend to look for a developer to help you if you're not a developer and that you want to add advanced code modifications like these.

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY0OTU3LWNhdGVnb3J5LW5hbWVzLWFkZGVkLXRvLXByb2R1Y3RzLXBhZ2VzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 5 months ago -  12 years 5 months ago [\#156309](#156309) by [rada88496](/forum/user/32070-rada88496 "View rada88496's Profile")  Replied by *[rada88496](/forum/user/32070-rada88496 "View rada88496's Profile")* on topic *[Re: Category Names added to Products pages](/forum/4-how-to/64957-category-names-added-to-products-pages#156309 "Hi HikaShop Support..  Im sure I had this figured out before, but seem to lost where to add this.  I would like to have the Category names automatically added to each Product page so customers can see that they are in a &quot;certain category of products&quot;. (Enclosed: a sample of what im talking about)  Example: when customer clicks on &quot;amino acids category&quot; ... all amino acids products apear under the heading &quot;Amino Acids&quot;.  Thanks again guyz... appreciate your time and work..!  Also, awaiting 1.6.0 and the &quot;badges&quot; to come around. section for hikashop!......hikashop is amazing.. !!  Big5hot   www.tsn.sportsnutrition.com")*

I am always trying to learn new stuff...
thanks your time ![:)](/media/kunena/emoticons/8.png ":)")

Last edit: 12 years 5 months ago by [rada88496](/forum/user/32070-rada88496 "View rada88496's Profile"). Reason: its3am

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY0OTU3LWNhdGVnb3J5LW5hbWVzLWFkZGVkLXRvLXByb2R1Y3RzLXBhZ2VzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 20
- Thank you received: 0
-
-

11 years 11 months ago [\#180388](#180388) by [further](/forum/user/10547-further "View further's Profile")  Replied by *[further](/forum/user/10547-further "View further's Profile")* on topic *[Re: Category Names added to Products pages](/forum/4-how-to/64957-category-names-added-to-products-pages#180388 "Hi HikaShop Support..  Im sure I had this figured out before, but seem to lost where to add this.  I would like to have the Category names automatically added to each Product page so customers can see that they are in a &quot;certain category of products&quot;. (Enclosed: a sample of what im talking about)  Example: when customer clicks on &quot;amino acids category&quot; ... all amino acids products apear under the heading &quot;Amino Acids&quot;.  Thanks again guyz... appreciate your time and work..!  Also, awaiting 1.6.0 and the &quot;badges&quot; to come around. section for hikashop!......hikashop is amazing.. !!  Big5hot   www.tsn.sportsnutrition.com")*

This is exactly what I was looking for but could you share with me how to make these categories links that are clickable to their respective categories?

> Mohamed Thelji wrote: Hi,
>
> Sorry I misunderstood your question you should :
> \- Go to "Hikashop-&gt;Display-&gt;Views"
> \- Edit the "show\_default" file of the "product" view of the front-end's template that you are currently using
> \- Add this code :
>
> Code:
>
> &lt;?php foreach($this-&gt;categories as $category){ echo ($category-&gt;category_name).' - '; } ?&gt;
>
>
>
> after Code:
>
> &lt;div id="hikashop_product_top_part" class="hikashop_product_top_part"&gt;
>
>
>
> Hope this will help you.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY0OTU3LWNhdGVnb3J5LW5hbWVzLWFkZGVkLXRvLXByb2R1Y3RzLXBhZ2VzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14264
-
-

11 years 11 months ago [\#180409](#180409) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Category Names added to Products pages](/forum/4-how-to/64957-category-names-added-to-products-pages#180409 "Hi HikaShop Support..  Im sure I had this figured out before, but seem to lost where to add this.  I would like to have the Category names automatically added to each Product page so customers can see that they are in a &quot;certain category of products&quot;. (Enclosed: a sample of what im talking about)  Example: when customer clicks on &quot;amino acids category&quot; ... all amino acids products apear under the heading &quot;Amino Acids&quot;.  Thanks again guyz... appreciate your time and work..!  Also, awaiting 1.6.0 and the &quot;badges&quot; to come around. section for hikashop!......hikashop is amazing.. !!  Big5hot   www.tsn.sportsnutrition.com")*

Hi,

change the code: Code:

echo ($category-&gt;category_name).' - ';

to: Code:

$categoryClass = hikashop_get('class.category'); $categoryClass-&gt;addAlias($category); echo '&lt;a href="'.hikashop_contentLink('category&amp;task=listing&amp;cid='.$category-&gt;category_id.'&amp;name='.$category-&gt;alias,$category).'"&gt;'.($category-&gt;category_name).'&lt;/a&gt; - ';

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY0OTU3LWNhdGVnb3J5LW5hbWVzLWFkZGVkLXRvLXByb2R1Y3RzLXBhZ2VzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 10
- Thank you received: 0
-
-

10 years 5 months ago [\#239823](#239823) by [laus](/forum/user/39892-laus "View laus's Profile")  Replied by *[laus](/forum/user/39892-laus "View laus's Profile")* on topic *[Category Names added to Products pages](/forum/4-how-to/64957-category-names-added-to-products-pages#239823 "Hi HikaShop Support..  Im sure I had this figured out before, but seem to lost where to add this.  I would like to have the Category names automatically added to each Product page so customers can see that they are in a &quot;certain category of products&quot;. (Enclosed: a sample of what im talking about)  Example: when customer clicks on &quot;amino acids category&quot; ... all amino acids products apear under the heading &quot;Amino Acids&quot;.  Thanks again guyz... appreciate your time and work..!  Also, awaiting 1.6.0 and the &quot;badges&quot; to come around. section for hikashop!......hikashop is amazing.. !!  Big5hot   www.tsn.sportsnutrition.com")*

I have tried this solution but I get nothing but a '-' displaying on the product page view, has the code required to add a Category Name and link changed since this solution was proposed?

I have a site with sports teams listed, each team has a sub-category of the main category 'clubshops' and I would like to display this above the product name so that people can flick back to the teams main category view.

I have tried this...
Code:

&lt;?php foreach($this-&gt;categories as $category){ $categoryClass = hikashop_get('class.category'); $categoryClass-&gt;addAlias($category); echo '&lt;a href="'.hikashop_contentLink('category&amp;task=listing&amp;cid='.$category-&gt;category_id.'&amp;name='.$category-&gt;alias,$category).'"&gt;'.($category-&gt;category_name).'&lt;/a&gt; - '; } ?&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY0OTU3LWNhdGVnb3J5LW5hbWVzLWFkZGVkLXRvLXByb2R1Y3RzLXBhZ2VzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14264
-
-

10 years 5 months ago [\#239832](#239832) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Category Names added to Products pages](/forum/4-how-to/64957-category-names-added-to-products-pages#239832 "Hi HikaShop Support..  Im sure I had this figured out before, but seem to lost where to add this.  I would like to have the Category names automatically added to each Product page so customers can see that they are in a &quot;certain category of products&quot;. (Enclosed: a sample of what im talking about)  Example: when customer clicks on &quot;amino acids category&quot; ... all amino acids products apear under the heading &quot;Amino Acids&quot;.  Thanks again guyz... appreciate your time and work..!  Also, awaiting 1.6.0 and the &quot;badges&quot; to come around. section for hikashop!......hikashop is amazing.. !!  Big5hot   www.tsn.sportsnutrition.com")*

Hi,

That code should still work fine.
Could you give a link to the page where you have that ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY0OTU3LWNhdGVnb3J5LW5hbWVzLWFkZGVkLXRvLXByb2R1Y3RzLXBhZ2VzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 10
- Thank you received: 0
-
-

10 years 5 months ago [\#239921](#239921) by [laus](/forum/user/39892-laus "View laus's Profile")  Replied by *[laus](/forum/user/39892-laus "View laus's Profile")* on topic *[Category Names added to Products pages](/forum/4-how-to/64957-category-names-added-to-products-pages#239921 "Hi HikaShop Support..  Im sure I had this figured out before, but seem to lost where to add this.  I would like to have the Category names automatically added to each Product page so customers can see that they are in a &quot;certain category of products&quot;. (Enclosed: a sample of what im talking about)  Example: when customer clicks on &quot;amino acids category&quot; ... all amino acids products apear under the heading &quot;Amino Acids&quot;.  Thanks again guyz... appreciate your time and work..!  Also, awaiting 1.6.0 and the &quot;badges&quot; to come around. section for hikashop!......hikashop is amazing.. !!  Big5hot   www.tsn.sportsnutrition.com")*

Hi Nicolas,

Truly bizarre, just added the same code I had tried (and pasted here) back into the page, and this time I get a Link???

Sample URL to product page: [ /teamshop/llansawel/product/396-training-vest](http://design-source-supply.com/teamshop/llansawel/product/396-training-vest)

I have added code to templates/gk_storefront/html/product/show_tabular.php

However the link created goes to: /teamshop/llansawel/team/27-llansawel-rfc

And I would like it to go to: /teamshop/llansawel/

Is there anyway to change this, other than editing .htaccess to redirect?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY0OTU3LWNhdGVnb3J5LW5hbWVzLWFkZGVkLXRvLXByb2R1Y3RzLXBhZ2VzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 10
- Thank you received: 0
-
-

10 years 5 months ago [\#239922](#239922) by [laus](/forum/user/39892-laus "View laus's Profile")  Replied by *[laus](/forum/user/39892-laus "View laus's Profile")* on topic *[Category Names added to Products pages](/forum/4-how-to/64957-category-names-added-to-products-pages#239922 "Hi HikaShop Support..  Im sure I had this figured out before, but seem to lost where to add this.  I would like to have the Category names automatically added to each Product page so customers can see that they are in a &quot;certain category of products&quot;. (Enclosed: a sample of what im talking about)  Example: when customer clicks on &quot;amino acids category&quot; ... all amino acids products apear under the heading &quot;Amino Acids&quot;.  Thanks again guyz... appreciate your time and work..!  Also, awaiting 1.6.0 and the &quot;badges&quot; to come around. section for hikashop!......hikashop is amazing.. !!  Big5hot   www.tsn.sportsnutrition.com")*

I have solved this now, by altering the canonical URL for the Category to the same as the Menu Item for that category.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzY0OTU3LWNhdGVnb3J5LW5hbWVzLWFkZGVkLXRvLXByb2R1Y3RzLXBhZ2VzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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.601 seconds

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

[](#top)
