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

#   Links to categories hide

##

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

Less More

- Posts: 431
- Thank you received: 19
-
-

9 years 7 months ago [\#267133](#267133) by [neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")  *[Links to categories hide](/forum/19-hikamarket/889770-links-to-categories-hide#267133 "-- HikaShop version -- : 3.0.1 -- HikaMarket version -- : 1.7.3  Hi I have the following problem. When a partner created a variant of the product, links to all categories hide. So should look product page  But after adding variants look like  How can I fix this ?")* was created by *[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")*

-- HikaShop version -- : 3.0.1
-- HikaMarket version -- : 1.7.3

Hi I have the following problem. When a partner created a variant of the product, links to all categories hide.
So should look product page
[ ![1&#95;2017-04-11.PNG](/forum/attachment/37560) ](/forum/attachment/37560 "1&#95;2017-04-11.PNG")

But after adding variants look like
[ ![2&#95;2017-04-11.PNG](/forum/attachment/37561) ](/forum/attachment/37561 "2&#95;2017-04-11.PNG")

How can I fix this ?

- [ ![1&#95;2017-04-11.PNG](/forum/attachment/37560) ](/forum/attachment/37560 "1&#95;2017-04-11.PNG") [ ](/forum/attachment/37560?download=1 "1&#95;2017-04-11.PNG")
- [ ![2&#95;2017-04-11.PNG](/forum/attachment/37561) ](/forum/attachment/37561 "2&#95;2017-04-11.PNG") [ ](/forum/attachment/37561?download=1 "2&#95;2017-04-11.PNG")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE5LWhpa2FtYXJrZXQvODg5NzcwLWxpbmtzLXRvLWNhdGVnb3JpZXMtaGlkZT90bXBsPW1hcmtkb3du) 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: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

9 years 7 months ago [\#267168](#267168) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Links to categories hide](/forum/19-hikamarket/889770-links-to-categories-hide#267168 "-- HikaShop version -- : 3.0.1 -- HikaMarket version -- : 1.7.3  Hi I have the following problem. When a partner created a variant of the product, links to all categories hide. So should look product page  But after adding variants look like  How can I fix this ?")*

Hello,

A variant do not have categories because it uses the main product categories.
I don't know how you perform the display but if you are loading just the variant, you'll need to also load the main product to get this categories.

Regards,

---

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

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

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

Less More

- Posts: 431
- Thank you received: 19
-
-

9 years 7 months ago [\#267188](#267188) by [neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")  Replied by *[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")* on topic *[Links to categories hide](/forum/19-hikamarket/889770-links-to-categories-hide#267188 "-- HikaShop version -- : 3.0.1 -- HikaMarket version -- : 1.7.3  Hi I have the following problem. When a partner created a variant of the product, links to all categories hide. So should look product page  But after adding variants look like  How can I fix this ?")*

The code to display links to categories Code:

&lt;?php $developers = ''; $publishers = ''; foreach($this-&gt;categories as $category){ $categoryClass = hikashop_get('class.category'); $categoryClass-&gt;addAlias($category); if($category-&gt;category_parent_id == '15') $developers .= '&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;'; elseif($category-&gt;category_parent_id == '22') $publishers .= '&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;'; } echo "&lt;span class='list-developers'&gt;".JText::_('Developer: ').$developers."&lt;/span&gt;&lt;br/&gt;"; echo "&lt;span class='list-publishers'&gt;".JText::_('Publisher: ').$publishers."&lt;/span&gt;"; ?&gt;

But after partner added his a variant of the product, the links do not show already

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE5LWhpa2FtYXJrZXQvODg5NzcwLWxpbmtzLXRvLWNhdGVnb3JpZXMtaGlkZT90bXBsPW1hcmtkb3du) 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: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

9 years 7 months ago [\#267189](#267189) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Links to categories hide](/forum/19-hikamarket/889770-links-to-categories-hide#267189 "-- HikaShop version -- : 3.0.1 -- HikaMarket version -- : 1.7.3  Hi I have the following problem. When a partner created a variant of the product, links to all categories hide. So should look product page  But after adding variants look like  How can I fix this ?")*

Hello,

I'm afraid that your issue is not related with HikaMarket at all ; but only to HikaShop.

Here the patch for the HikaShop product view file : Code:

$query = 'SELECT b.* '. ' FROM '.hikashop_table('product_category').' AS a '. ' LEFT JOIN '.hikashop_table('category').' AS b ON a.category_id = b.category_id '. ' WHERE a.product_id = '.(int)$element-&gt;product_id. ' ORDER BY a.product_category_id ASC';

By Code:

$query = 'SELECT b.* '. ' FROM '.hikashop_table('product_category').' AS a '. ' LEFT JOIN '.hikashop_table('category').' AS b ON a.category_id = b.category_id '. ' WHERE a.product_id = '.(($element-&gt;product_type == 'variant' &amp;&amp; !empty($element-&gt;product_parent_id)) ? (int)$element-&gt;product_parent_id : (int)$element-&gt;product_id). ' ORDER BY a.product_category_id ASC';

Do not reply to this topic ; if you have any more question regarding that issue, you have to create a new thread in the HikaShop section of the forum.
Thank you for your understanding.

Regards,

---

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

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE5LWhpa2FtYXJrZXQvODg5NzcwLWxpbmtzLXRvLWNhdGVnb3JpZXMtaGlkZT90bXBsPW1hcmtkb3du) 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?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

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

Time to create page: 0.049 seconds

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