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

#   Customize show category title on a product page

##

- **[andreasuriani](/forum/user/28733-andreasuriani "View andreasuriani's Profile")**
- [![andreasuriani's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar28733.jpg)](/forum/user/28733-andreasuriani "View andreasuriani's Profile") Topic Author
- [ Offline](/forum/user/28733-andreasuriani)

Less More

- Posts: 177
- Thank you received: 1
-
-

9 years 7 months ago [\#267483](#267483) by [andreasuriani](/forum/user/28733-andreasuriani "View andreasuriani's Profile")  *[Customize show category title on a product page](/forum/26-product-category-display/889827-customize-show-category-title-on-a-product-page#267483 "Hi Guys, i know this argument is very &quot;oldy&quot; but let me explain:  When i try to put the follow code on a show&#95;defoult.php the code works but the result is more or less this:  Code: categories as $key =&gt; $value) {  ?&gt;      category&#95;name ?&gt;      category1 &gt;subcategory  How can o do this?")* was created by *[andreasuriani](/forum/user/28733-andreasuriani "View andreasuriani's Profile")*

Hi Guys,
i know this argument is very "oldy" but let me explain:

When i try to put the follow code on a show_defoult.php the code works but the result is more or less this:
Code:

&lt;?php 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 }

The Result is:

product category
category1
subcategory

I'd like to show something like this:

product category &gt; category1 &gt;subcategory

How can o do this?

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

9 years 7 months ago [\#267485](#267485) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Customize show category title on a product page](/forum/26-product-category-display/889827-customize-show-category-title-on-a-product-page#267485 "Hi Guys, i know this argument is very &quot;oldy&quot; but let me explain:  When i try to put the follow code on a show&#95;defoult.php the code works but the result is more or less this:  Code: categories as $key =&gt; $value) {  ?&gt;      category&#95;name ?&gt;      category1 &gt;subcategory  How can o do this?")*

Hello,

Use some CSS ? Not use "div" but span ?
Please understand that your question is related to some customization, but there is no real link with HikaShop because you already have the content and all ; you're just want to change the design and it is outside what our support can do.
[ www.hikashop.com/support/documentation/1...ize-the-display.html](https://www.hikashop.com/support/documentation/153-customize-the-display.html)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

- **[andreasuriani](/forum/user/28733-andreasuriani "View andreasuriani's Profile")**
- [![andreasuriani's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar28733.jpg)](/forum/user/28733-andreasuriani "View andreasuriani's Profile") Topic Author
- [ Offline](/forum/user/28733-andreasuriani)

Less More

- Posts: 177
- Thank you received: 1
-
-

9 years 7 months ago -  9 years 7 months ago [\#267766](#267766) by [andreasuriani](/forum/user/28733-andreasuriani "View andreasuriani's Profile")  Replied by *[andreasuriani](/forum/user/28733-andreasuriani "View andreasuriani's Profile")* on topic *[Customize show category title on a product page](/forum/26-product-category-display/889827-customize-show-category-title-on-a-product-page#267766 "Hi Guys, i know this argument is very &quot;oldy&quot; but let me explain:  When i try to put the follow code on a show&#95;defoult.php the code works but the result is more or less this:  Code: categories as $key =&gt; $value) {  ?&gt;      category&#95;name ?&gt;      category1 &gt;subcategory  How can o do this?")*

I made a solution:
Code:

&lt;?php $i=0; foreach ($this-&gt;categories as $key =&gt; $value) { echo '&lt;strong&gt;&lt;span id="hikashop_product_category_'.$value-&gt;category_id.'"&gt;'; echo $value-&gt;category_name; if(($i+1)&lt;count($this-&gt;categories)){ echo " &gt; "; } echo "&lt;/span&gt;&lt;/strong&gt;"; $i++; } ?&gt;

Hope is it will useful for everybody...

Ciao Ciao
A.

Last edit: 9 years 7 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile"). Reason: indent code

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODk4MjctY3VzdG9taXplLXNob3ctY2F0ZWdvcnktdGl0bGUtb24tYS1wcm9kdWN0LXBhZ2U/dG1wbD1tYXJrZG93bg==) 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.050 seconds

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