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

#   variant related product

##

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

Less More

- Posts: 23
- Thank you received: 5
-
-

6 months 10 hours ago [\#371778](#371778) by [mizso676](/forum/user/82243-mizso676 "View mizso676's Profile")  *[variant related product](/forum/50-feature-request/910495-variant-related-product#371778 "-- HikaShop version -- : 5.1.6 -- Joomla version -- : 5.2.2 -- PHP version -- : 8.2.20 -- Browser(s) name and version -- : chrome latest, firefox, etc.  Hi guys,  I have a question regarding product variants and related products functionality in HikaShop.  We are currently using HikaShop for an automotive parts webshop, and we have a specific use case that we are not sure how to properly implement with the default system.  Our structure:  We have products structured like this:  Product A: SKU 12312 contains 7 variants (e.g. Variant 1–7) Product B: SKU 43234 also contains 7 corresponding variants (Variant 1–7) Requirement:  We need to establish a relationship at variant level, not at product level.  For example:  Variant 5 of product 12312 (e.g. front left brakedisc) should automatically be associated with Variant 5 of product 43234 (e.g. front right brakedisc)  This pairing is consistent across all variants (1–7), meaning each variant index should map to the same index in the paired product.  Issue:  We noticed that HikaShop’s “related products” feature works only at product level and not at variant (child product) level. We also could not find a built-in way to assign related products individually per variant.  Question:  Is there any native way in HikaShop to:  assign related products per variant / characteristic value, or implement variant-to-variant relationships between different parent products?  If not, could you recommend the best practice or extension approach for handling this kind of cross-product variant pairing?  We would like to avoid custom hacks if there is an intended or recommended solution.  Thank you very much for your help.  Best regards, Zsolt")* was created by *[mizso676](/forum/user/82243-mizso676 "View mizso676's Profile")*

-- HikaShop version -- : 5.1.6
-- Joomla version -- : 5.2.2
-- PHP version -- : 8.2.20
-- Browser(s) name and version -- : chrome latest, firefox, etc.

Hi guys,

I have a question regarding product variants and related products functionality in HikaShop.

We are currently using HikaShop for an automotive parts webshop, and we have a specific use case that we are not sure how to properly implement with the default system.

Our structure:

We have products structured like this:

Product A: SKU 12312
contains 7 variants (e.g. Variant 1–7)
Product B: SKU 43234
also contains 7 corresponding variants (Variant 1–7)
Requirement:

We need to establish a relationship at variant level, not at product level.

For example:

Variant 5 of product 12312 (e.g. front left brakedisc)
should automatically be associated with
Variant 5 of product 43234 (e.g. front right brakedisc)

This pairing is consistent across all variants (1–7), meaning each variant index should map to the same index in the paired product.

Issue:

We noticed that HikaShop’s “related products” feature works only at product level and not at variant (child product) level. We also could not find a built-in way to assign related products individually per variant.

Question:

Is there any native way in HikaShop to:

assign related products per variant / characteristic value, or
implement variant-to-variant relationships between different parent products?

If not, could you recommend the best practice or extension approach for handling this kind of cross-product variant pairing?

We would like to avoid custom hacks if there is an intended or recommended solution.

Thank you very much for your help.

Best regards,
Zsolt

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

6 months 6 hours ago [\#371781](#371781) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[variant related product](/forum/50-feature-request/910495-variant-related-product#371781 "-- HikaShop version -- : 5.1.6 -- Joomla version -- : 5.2.2 -- PHP version -- : 8.2.20 -- Browser(s) name and version -- : chrome latest, firefox, etc.  Hi guys,  I have a question regarding product variants and related products functionality in HikaShop.  We are currently using HikaShop for an automotive parts webshop, and we have a specific use case that we are not sure how to properly implement with the default system.  Our structure:  We have products structured like this:  Product A: SKU 12312 contains 7 variants (e.g. Variant 1–7) Product B: SKU 43234 also contains 7 corresponding variants (Variant 1–7) Requirement:  We need to establish a relationship at variant level, not at product level.  For example:  Variant 5 of product 12312 (e.g. front left brakedisc) should automatically be associated with Variant 5 of product 43234 (e.g. front right brakedisc)  This pairing is consistent across all variants (1–7), meaning each variant index should map to the same index in the paired product.  Issue:  We noticed that HikaShop’s “related products” feature works only at product level and not at variant (child product) level. We also could not find a built-in way to assign related products individually per variant.  Question:  Is there any native way in HikaShop to:  assign related products per variant / characteristic value, or implement variant-to-variant relationships between different parent products?  If not, could you recommend the best practice or extension approach for handling this kind of cross-product variant pairing?  We would like to avoid custom hacks if there is an intended or recommended solution.  Thank you very much for your help.  Best regards, Zsolt")*

Hi,

There are several things here:
- First, by default related products can't be configured per variant, only at the main product level.
- Second, when you change the selection of the variant on the frontend, the related products area is not refreshed.
- Third, the related products area under the product page is a listing of products, not a listing of variants. It is not made to be able to display variants.

Basically, the system is not meant to do what you want here and thus it won't be easy. If it were me, I would develop a custom plugin for this. It would:
- add an interface to select products on the variant edit form. This could potentially by made with a custom text field where you would just enter the code of the related variants separated with a comma.
- using the onHikashopBeforeDisplayView event ( [ www.hikashop.com/support/documentation/6...hopBeforeDisplayView](https://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#onHikashopBeforeDisplayView) ), check that we're on the frontend product details page, load the data of the variants of all the variants of the current product, return the HTML of all of them with only the default variant's listing visible by default + JS code implementing hkContentChanged ( [ www.hikashop.com/support/documentation/6...tml#hkContentChanged](https://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#hkContentChanged) ) to change the visibility of the variants listing based on the selected variant.

With this, you have no custom hack, just a clean plugin implementing the events of HikaShop, so no surprises with updates.
However, it does require some development, several hundreds of lines of PHP to make that plugin.
If you have a proper setup, with a Claude Code or Codex, the AI can base itself on what I wrote here, plus the codebase of HikaShop and its plugins, to implement that plugin.

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

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

Less More

- Posts: 23
- Thank you received: 5
-
-

5 months 4 weeks ago [\#371800](#371800) by [mizso676](/forum/user/82243-mizso676 "View mizso676's Profile")  Replied by *[mizso676](/forum/user/82243-mizso676 "View mizso676's Profile")* on topic *[variant related product](/forum/50-feature-request/910495-variant-related-product#371800 "-- HikaShop version -- : 5.1.6 -- Joomla version -- : 5.2.2 -- PHP version -- : 8.2.20 -- Browser(s) name and version -- : chrome latest, firefox, etc.  Hi guys,  I have a question regarding product variants and related products functionality in HikaShop.  We are currently using HikaShop for an automotive parts webshop, and we have a specific use case that we are not sure how to properly implement with the default system.  Our structure:  We have products structured like this:  Product A: SKU 12312 contains 7 variants (e.g. Variant 1–7) Product B: SKU 43234 also contains 7 corresponding variants (Variant 1–7) Requirement:  We need to establish a relationship at variant level, not at product level.  For example:  Variant 5 of product 12312 (e.g. front left brakedisc) should automatically be associated with Variant 5 of product 43234 (e.g. front right brakedisc)  This pairing is consistent across all variants (1–7), meaning each variant index should map to the same index in the paired product.  Issue:  We noticed that HikaShop’s “related products” feature works only at product level and not at variant (child product) level. We also could not find a built-in way to assign related products individually per variant.  Question:  Is there any native way in HikaShop to:  assign related products per variant / characteristic value, or implement variant-to-variant relationships between different parent products?  If not, could you recommend the best practice or extension approach for handling this kind of cross-product variant pairing?  We would like to avoid custom hacks if there is an intended or recommended solution.  Thank you very much for your help.  Best regards, Zsolt")*

Thank you for the detailed explanation and guidance — it’s very helpful.

We understand the limitations and the suggested approach, and we’ll proceed with a custom plugin based on your recommendations.

Thanks again for your support!

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

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

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