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

#   Product Variations

##

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

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 11 months ago [\#3288](#3288) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  *[Product Variations](/forum/4-how-to/3288-product-variations#3288 "I am trying to create the following product display:  (&#42;) = maybe optional variant description / image. My guess is that if I understand the characteristic drop-down and get it working then I can change the template to use tick boxes or whatever.  However, I have following problems. (1) The product description / image does not display. Except under some odd conditions where I have an invalid combination of drop-downs. (2) At the category level it is displaying price and add to cart button - but the product has no price.  -----  This is only a stepping stone to the display layout I have in mind for a product family:  The product description may be complete in itself with no need for additional descriptions at the variant level.  Tabs implemented using CSS / JQuery in template.  You may not want to build this into core hikashop, and maybe its something left for template designers to setup for themselves.  How could the variants feature be used to implement this? Is this the best way - product parameters might be another route. I started creating a category and having the variants as different products in that category - that again shows promise as a possible route, but I have not completed it.")* was created by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")*

I am trying to create the following product display:
Code:

Product Name Product Description - Product Image Variant1a Tick Box (*) Variant1b Tick Box (*) Variant2a Tick Box (*) Variant2b Tick Box (*) Variant3a Tick Box (*) Variant3b Tick Box (*) Add to Cart (tick items)

(*) = maybe optional variant description / image.
My guess is that if I understand the characteristic drop-down and get it working then I can change the template to use tick boxes or whatever.

However, I have following problems.
(1) The product description / image does not display.
Except under some odd conditions where I have an invalid combination of drop-downs.
(2) At the category level it is displaying price and add to cart button - but the product has no price.

---

This is only a stepping stone to the display layout I have in mind for a product family:
Code:

Product Name Product Description - Product Image Tab 1 &#124; Tab 2 &#124; Tab 3 &#124; Tab 4 &#124; Tab 5 &#124; Tab 6 Each tab will contain: Check box for Variant 1a - if necessary additional description, image. Check box for Variant 1b - if necessary additional description, image. Add to Basket

The product description may be complete in itself with no need for additional descriptions at the variant level.

Tabs implemented using CSS / JQuery in template.

You may not want to build this into core hikashop, and maybe its something left for template designers to setup for themselves.

How could the variants feature be used to implement this?
Is this the best way - product parameters might be another route.
I started creating a category and having the variants as different products in that category - that again shows promise as a possible route, but I have not completed it.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMyODgtcHJvZHVjdC12YXJpYXRpb25zP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86561
- Thank you received: 14307
-
-

15 years 11 months ago [\#3293](#3293) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Product Variations](/forum/4-how-to/3288-product-variations#3293 "I am trying to create the following product display:  (&#42;) = maybe optional variant description / image. My guess is that if I understand the characteristic drop-down and get it working then I can change the template to use tick boxes or whatever.  However, I have following problems. (1) The product description / image does not display. Except under some odd conditions where I have an invalid combination of drop-downs. (2) At the category level it is displaying price and add to cart button - but the product has no price.  -----  This is only a stepping stone to the display layout I have in mind for a product family:  The product description may be complete in itself with no need for additional descriptions at the variant level.  Tabs implemented using CSS / JQuery in template.  You may not want to build this into core hikashop, and maybe its something left for template designers to setup for themselves.  How could the variants feature be used to implement this? Is this the best way - product parameters might be another route. I started creating a category and having the variants as different products in that category - that again shows promise as a possible route, but I have not completed it.")*

I see what you want to do. If I were you I would :
First, rewrite the whole show file of the product view to display the main product information ( in $this-&gt;element ) and each variant information ( a foreach on $this-&gt;element-&gt;variants ). Then, add standard joomla panes around the variants.
Then, around all this, add the form like on the current show with a standard input button for the add to cart button.
And for each variant's checkbox, use data[&lt;?php echo $row-&gt;product_id;?&gt;] as name of the input checkboxes so that the system will handle adding several variants at a time in the basket (like we do on the cart file).

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

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

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 11 months ago -  15 years 11 months ago [\#3316](#3316) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Re: Product Variations](/forum/4-how-to/3288-product-variations#3316 "I am trying to create the following product display:  (&#42;) = maybe optional variant description / image. My guess is that if I understand the characteristic drop-down and get it working then I can change the template to use tick boxes or whatever.  However, I have following problems. (1) The product description / image does not display. Except under some odd conditions where I have an invalid combination of drop-downs. (2) At the category level it is displaying price and add to cart button - but the product has no price.  -----  This is only a stepping stone to the display layout I have in mind for a product family:  The product description may be complete in itself with no need for additional descriptions at the variant level.  Tabs implemented using CSS / JQuery in template.  You may not want to build this into core hikashop, and maybe its something left for template designers to setup for themselves.  How could the variants feature be used to implement this? Is this the best way - product parameters might be another route. I started creating a category and having the variants as different products in that category - that again shows promise as a possible route, but I have not completed it.")*

Added the following to product show.php to use the *test* template for a particular product.
I would guess could use a custom product field for the template name and not hard-code the ID.
Code:

&lt;?php if(empty($this-&gt;element)){ $app =&amp; JFactory::getApplication(); $app-&gt;enqueueMessage(JText::_('PRODUCT_NOT_FOUND')); /* START CUSTOM */ }else if ($this-&gt;element-&gt;product_parent_id == 13){ echo $this-&gt;loadTemplate('test'); /* END CUSTOM */ }else{

Last edit: 15 years 11 months ago by [brainforge](/forum/user/423-brainforge "View brainforge's Profile").

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

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

Less More

- Posts: 30
- Thank you received: 0
-
-

15 years 8 months ago [\#9158](#9158) by [duponsa](/forum/user/1291-duponsa "View duponsa's Profile")  Replied by *[duponsa](/forum/user/1291-duponsa "View duponsa's Profile")* on topic *[Re: Product Variations](/forum/4-how-to/3288-product-variations#9158 "I am trying to create the following product display:  (&#42;) = maybe optional variant description / image. My guess is that if I understand the characteristic drop-down and get it working then I can change the template to use tick boxes or whatever.  However, I have following problems. (1) The product description / image does not display. Except under some odd conditions where I have an invalid combination of drop-downs. (2) At the category level it is displaying price and add to cart button - but the product has no price.  -----  This is only a stepping stone to the display layout I have in mind for a product family:  The product description may be complete in itself with no need for additional descriptions at the variant level.  Tabs implemented using CSS / JQuery in template.  You may not want to build this into core hikashop, and maybe its something left for template designers to setup for themselves.  How could the variants feature be used to implement this? Is this the best way - product parameters might be another route. I started creating a category and having the variants as different products in that category - that again shows promise as a possible route, but I have not completed it.")*

Hi, I'm just jumping in because what i'm trying to do is quite similar but with 1 more level of "Variant". for example selling clothing, i'm wanting the design to be the main product and have t-shirt, cap, jacket to be a the first level of variant and then the sizes to be a variant of that first variant.
not sure if it makes sens.
like this:
[ www.threadless.com/product/2740/Cooling\_Off/](http://www.threadless.com/product/2740/Cooling_Off/)

I have just discovered HikaShop and It seams that there is only one level possibility for the variants. so I was thinking using categories like this:
Code:

Category Name (the design would be a category) Image Gallery with thumbnails of each products within the category Products Names Tab 1 &#124; Tab 2 &#124; Tab 3 &#124; Tab 4 &#124; Tab 5 &#124; Tab 6 (tabs being the products names) Each tab will contain: Product Name Product Description - Product Image Check box for Variant 1a Check box for Variant 1b Add to Basket

how would you advise I go about this?
thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMyODgtcHJvZHVjdC12YXJpYXRpb25zP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86561
- Thank you received: 14307
-
-

15 years 8 months ago -  15 years 8 months ago [\#9161](#9161) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Product Variations](/forum/4-how-to/3288-product-variations#9161 "I am trying to create the following product display:  (&#42;) = maybe optional variant description / image. My guess is that if I understand the characteristic drop-down and get it working then I can change the template to use tick boxes or whatever.  However, I have following problems. (1) The product description / image does not display. Except under some odd conditions where I have an invalid combination of drop-downs. (2) At the category level it is displaying price and add to cart button - but the product has no price.  -----  This is only a stepping stone to the display layout I have in mind for a product family:  The product description may be complete in itself with no need for additional descriptions at the variant level.  Tabs implemented using CSS / JQuery in template.  You may not want to build this into core hikashop, and maybe its something left for template designers to setup for themselves.  How could the variants feature be used to implement this? Is this the best way - product parameters might be another route. I started creating a category and having the variants as different products in that category - that again shows promise as a possible route, but I have not completed it.")*

The easiest would be to use normal products and just define a custom function to handle the output of the characteristics with tabs for the first characteristic and radio for the other ones which will be in the tabs.

We will add the code below on our end in the file administrator/components/com_hikashop/types/characteristic.php :
$app =&amp; JFactory::getApplication();
$chromePath = JPATH_THEMES.DS.$app-&gt;getTemplate().DS.'html'.DS.'hikashop_characteristics.php';
if (file_exists($chromePath)){
require_once ($chromePath);
if(function_exists('hikashop_characteristics_html')){
$html = hikashop_characteristics_html($element,$params);
}
}
if(empty($html)){

before:
switch($params-&gt;get('characteristic_display')){

and add a bracket at the end of the switch.

You should make the same modification and then create the file templates/YOUR_TEMPLATE/html/hikashop_characteristics.php where you can define the function hikashop_characteristics_html(&amp;$element,&amp;$params) which will return the html of the tabs. You can use the other cases in the function displayFE as examples of how to parse the characteristic data in order to build your HTML.

Last edit: 15 years 8 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile"). Reason: corrected code

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

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

Less More

- Posts: 30
- Thank you received: 0
-
-

15 years 8 months ago [\#9169](#9169) by [duponsa](/forum/user/1291-duponsa "View duponsa's Profile")  Replied by *[duponsa](/forum/user/1291-duponsa "View duponsa's Profile")* on topic *[Re: Product Variations](/forum/4-how-to/3288-product-variations#9169 "I am trying to create the following product display:  (&#42;) = maybe optional variant description / image. My guess is that if I understand the characteristic drop-down and get it working then I can change the template to use tick boxes or whatever.  However, I have following problems. (1) The product description / image does not display. Except under some odd conditions where I have an invalid combination of drop-downs. (2) At the category level it is displaying price and add to cart button - but the product has no price.  -----  This is only a stepping stone to the display layout I have in mind for a product family:  The product description may be complete in itself with no need for additional descriptions at the variant level.  Tabs implemented using CSS / JQuery in template.  You may not want to build this into core hikashop, and maybe its something left for template designers to setup for themselves.  How could the variants feature be used to implement this? Is this the best way - product parameters might be another route. I started creating a category and having the variants as different products in that category - that again shows promise as a possible route, but I have not completed it.")*

thank you for the quick reply.
I just realized that I didn't understand how characteristics and variations worked.
thank you for your input I will try what you suggested. the more I look at this component the more amazing i find it!
ultimately I want to use JQuery UI for the tabs and radio buttons. specifically using: [ tushev.org/products/jqueryintegrator](http://tushev.org/products/jqueryintegrator)
Where would I put the Jquery code?

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

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

Less More

- Posts: 30
- Thank you received: 0
-
-

15 years 8 months ago [\#9170](#9170) by [duponsa](/forum/user/1291-duponsa "View duponsa's Profile")  Replied by *[duponsa](/forum/user/1291-duponsa "View duponsa's Profile")* on topic *[Re: Product Variations](/forum/4-how-to/3288-product-variations#9170 "I am trying to create the following product display:  (&#42;) = maybe optional variant description / image. My guess is that if I understand the characteristic drop-down and get it working then I can change the template to use tick boxes or whatever.  However, I have following problems. (1) The product description / image does not display. Except under some odd conditions where I have an invalid combination of drop-downs. (2) At the category level it is displaying price and add to cart button - but the product has no price.  -----  This is only a stepping stone to the display layout I have in mind for a product family:  The product description may be complete in itself with no need for additional descriptions at the variant level.  Tabs implemented using CSS / JQuery in template.  You may not want to build this into core hikashop, and maybe its something left for template designers to setup for themselves.  How could the variants feature be used to implement this? Is this the best way - product parameters might be another route. I started creating a category and having the variants as different products in that category - that again shows promise as a possible route, but I have not completed it.")*

thank you for the quick reply.
I just realized that I didn't understand how characteristics and variations worked.
thank you for your input I will try what you suggested. the more I look at this component the more amazing i find it!
ultimately I want to use JQuery UI for the tabs and radio buttons. specifically using: [ tushev.org/products/jqueryintegrator](http://tushev.org/products/jqueryintegrator)
Where would I put the Jquery code?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMyODgtcHJvZHVjdC12YXJpYXRpb25zP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86561
- Thank you received: 14307
-
-

15 years 8 months ago [\#9171](#9171) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Product Variations](/forum/4-how-to/3288-product-variations#9171 "I am trying to create the following product display:  (&#42;) = maybe optional variant description / image. My guess is that if I understand the characteristic drop-down and get it working then I can change the template to use tick boxes or whatever.  However, I have following problems. (1) The product description / image does not display. Except under some odd conditions where I have an invalid combination of drop-downs. (2) At the category level it is displaying price and add to cart button - but the product has no price.  -----  This is only a stepping stone to the display layout I have in mind for a product family:  The product description may be complete in itself with no need for additional descriptions at the variant level.  Tabs implemented using CSS / JQuery in template.  You may not want to build this into core hikashop, and maybe its something left for template designers to setup for themselves.  How could the variants feature be used to implement this? Is this the best way - product parameters might be another route. I started creating a category and having the variants as different products in that category - that again shows promise as a possible route, but I have not completed it.")*

I'm not familiar with this extension but you should put your code in the function hikashop_characteristics_html since that's where you want to use it.

PS: I've updated the override code with a working version.

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

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