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

#   Product variants or product category view problem

##

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

Less More

- Posts: 4
- Thank you received: 1
-
-

8 months 3 weeks ago [\#370727](#370727) by [Gynta](/forum/user/84015-gynta "View Gynta's Profile")  *[Product variants or product category view problem](/forum/26-product-category-display/910167-product-variants-or-product-category-view-problem#370727 "-- HikaShop version -- : 6.3.0 -- Joomla version -- : 5.4.3 -- PHP version -- : 8.3.30 -- Browser(s) name and version -- : Firefox 148.0  I’m pretty new to HikaShop.  I import products (Moodle-Courses via Joomdle) and some of these products/courses are pretty much the same with the exception of the dates. I would like to have these courses displayed on one page with checkboxes or radio buttons next to the different dates and one add-to-cart button.  The normal way, I think, would be to have a product and than create variants of it. But these products already exist. And I need the original imported products because they are linked to the courses in Moodle. My first question is: Is it somehow possible to turn a product into a variant of another product?  I tried another way, created a category for these courses/products and have them displayed on one page in a category view. Now I have the dates (in the product names) on one page, but each one has it’s own add-to-cart button. My second question: Is it possible to turn these add-to-cart buttons into checkboxes with only one add-to-cart-button beneath it?  It would be nice if somebody had a solution for one of the two problems so I could have the look I’d like.")* was created by *[Gynta](/forum/user/84015-gynta "View Gynta's Profile")*

-- HikaShop version -- : 6.3.0
-- Joomla version -- : 5.4.3
-- PHP version -- : 8.3.30
-- Browser(s) name and version -- : Firefox 148.0

I’m pretty new to HikaShop.

I import products (Moodle-Courses via Joomdle) and some of these products/courses are pretty much the same with the exception of the dates. I would like to have these courses displayed on one page with checkboxes or radio buttons next to the different dates and one add-to-cart button.

The normal way, I think, would be to have a product and than create variants of it. But these products already exist. And I need the original imported products because they are linked to the courses in Moodle.
My first question is: Is it somehow possible to turn a product into a variant of another product?

I tried another way, created a category for these courses/products and have them displayed on one page in a category view. Now I have the dates (in the product names) on one page, but each one has it’s own add-to-cart button.
My second question: Is it possible to turn these add-to-cart buttons into checkboxes with only one add-to-cart-button beneath it?

It would be nice if somebody had a solution for one of the two problems so I could have the look I’d like.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MTAxNjctcHJvZHVjdC12YXJpYW50cy1vci1wcm9kdWN0LWNhdGVnb3J5LXZpZXctcHJvYmxlbT90bXBsPW1hcmtkb3du) 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: 86593
- Thank you received: 14334
-
-

8 months 3 weeks ago [\#370729](#370729) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product variants or product category view problem](/forum/26-product-category-display/910167-product-variants-or-product-category-view-problem#370729 "-- HikaShop version -- : 6.3.0 -- Joomla version -- : 5.4.3 -- PHP version -- : 8.3.30 -- Browser(s) name and version -- : Firefox 148.0  I’m pretty new to HikaShop.  I import products (Moodle-Courses via Joomdle) and some of these products/courses are pretty much the same with the exception of the dates. I would like to have these courses displayed on one page with checkboxes or radio buttons next to the different dates and one add-to-cart button.  The normal way, I think, would be to have a product and than create variants of it. But these products already exist. And I need the original imported products because they are linked to the courses in Moodle. My first question is: Is it somehow possible to turn a product into a variant of another product?  I tried another way, created a category for these courses/products and have them displayed on one page in a category view. Now I have the dates (in the product names) on one page, but each one has it’s own add-to-cart button. My second question: Is it possible to turn these add-to-cart buttons into checkboxes with only one add-to-cart-button beneath it?  It would be nice if somebody had a solution for one of the two problems so I could have the look I’d like.")*

Hi,

I have a solution for both:
1. Instead of having variants, you can add these other products in the "options" setting of the main product:
[ www.hikashop.com/support/documentation/i...ct-form.html#options](https://www.hikashop.com/support/documentation/integrated-documentation/19-hikashop-product-form.html#options)
Then, you can change the "Product selection method" setting to "checkbox":
[ www.hikashop.com/support/documentation/5...html#display\_product](https://www.hikashop.com/support/documentation/54-hikashop-config.html#display_product)
On the product page of that main product, you'll no have one checkbox for each option product.

2. If you set the "Add to cart on listings" setting to "global", you'll have one quantity input for each product of listings and a global add to cart button at the bottom of the products listings:
[ www.hikashop.com/support/documentation/5...html#display\_product](https://www.hikashop.com/support/documentation/54-hikashop-config.html#display_product)
Now, granted it's an input field, not a checkbox. To have a checkbox would require some code customization.

The following user(s) said Thank You: [Gynta](/forum/user/84015-gynta "View Gynta's Profile")

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

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

Less More

- Posts: 4
- Thank you received: 1
-
-

8 months 3 weeks ago -  8 months 3 weeks ago [\#370733](#370733) by [Gynta](/forum/user/84015-gynta "View Gynta's Profile")  Replied by *[Gynta](/forum/user/84015-gynta "View Gynta's Profile")* on topic *[Product variants or product category view problem](/forum/26-product-category-display/910167-product-variants-or-product-category-view-problem#370733 "-- HikaShop version -- : 6.3.0 -- Joomla version -- : 5.4.3 -- PHP version -- : 8.3.30 -- Browser(s) name and version -- : Firefox 148.0  I’m pretty new to HikaShop.  I import products (Moodle-Courses via Joomdle) and some of these products/courses are pretty much the same with the exception of the dates. I would like to have these courses displayed on one page with checkboxes or radio buttons next to the different dates and one add-to-cart button.  The normal way, I think, would be to have a product and than create variants of it. But these products already exist. And I need the original imported products because they are linked to the courses in Moodle. My first question is: Is it somehow possible to turn a product into a variant of another product?  I tried another way, created a category for these courses/products and have them displayed on one page in a category view. Now I have the dates (in the product names) on one page, but each one has it’s own add-to-cart button. My second question: Is it possible to turn these add-to-cart buttons into checkboxes with only one add-to-cart-button beneath it?  It would be nice if somebody had a solution for one of the two problems so I could have the look I’d like.")*

> nicolas wrote: 1. Instead of having variants, you can add these other products in the "options" setting of the main product:
> [ www.hikashop.com/support/documentation/i...ct-form.html#options](https://www.hikashop.com/support/documentation/integrated-documentation/19-hikashop-product-form.html#options)
> Then, you can change the "Product selection method" setting to "checkbox":
> [ www.hikashop.com/support/documentation/5...html#display\_product](https://www.hikashop.com/support/documentation/54-hikashop-config.html#display_product)
> On the product page of that main product, you'll no have one checkbox for each option product.

Thank you for your quick answer. To use "options" I'll have to buy a commercial version of HikaShop, right? Does it matter which one?

Last edit: 8 months 3 weeks ago by [Gynta](/forum/user/84015-gynta "View Gynta's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MTAxNjctcHJvZHVjdC12YXJpYW50cy1vci1wcm9kdWN0LWNhdGVnb3J5LXZpZXctcHJvYmxlbT90bXBsPW1hcmtkb3du) 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: 86593
- Thank you received: 14334
-
-

8 months 3 weeks ago [\#370736](#370736) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product variants or product category view problem](/forum/26-product-category-display/910167-product-variants-or-product-category-view-problem#370736 "-- HikaShop version -- : 6.3.0 -- Joomla version -- : 5.4.3 -- PHP version -- : 8.3.30 -- Browser(s) name and version -- : Firefox 148.0  I’m pretty new to HikaShop.  I import products (Moodle-Courses via Joomdle) and some of these products/courses are pretty much the same with the exception of the dates. I would like to have these courses displayed on one page with checkboxes or radio buttons next to the different dates and one add-to-cart button.  The normal way, I think, would be to have a product and than create variants of it. But these products already exist. And I need the original imported products because they are linked to the courses in Moodle. My first question is: Is it somehow possible to turn a product into a variant of another product?  I tried another way, created a category for these courses/products and have them displayed on one page in a category view. Now I have the dates (in the product names) on one page, but each one has it’s own add-to-cart button. My second question: Is it possible to turn these add-to-cart buttons into checkboxes with only one add-to-cart-button beneath it?  It would be nice if somebody had a solution for one of the two problems so I could have the look I’d like.")*

That's correct. Both can do it, so it doesn't matter which one you choose to be able to use this capability.

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

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

Less More

- Posts: 4
- Thank you received: 1
-
-

8 months 4 days ago [\#371061](#371061) by [Gynta](/forum/user/84015-gynta "View Gynta's Profile")  Replied by *[Gynta](/forum/user/84015-gynta "View Gynta's Profile")* on topic *[Product variants or product category view problem](/forum/26-product-category-display/910167-product-variants-or-product-category-view-problem#371061 "-- HikaShop version -- : 6.3.0 -- Joomla version -- : 5.4.3 -- PHP version -- : 8.3.30 -- Browser(s) name and version -- : Firefox 148.0  I’m pretty new to HikaShop.  I import products (Moodle-Courses via Joomdle) and some of these products/courses are pretty much the same with the exception of the dates. I would like to have these courses displayed on one page with checkboxes or radio buttons next to the different dates and one add-to-cart button.  The normal way, I think, would be to have a product and than create variants of it. But these products already exist. And I need the original imported products because they are linked to the courses in Moodle. My first question is: Is it somehow possible to turn a product into a variant of another product?  I tried another way, created a category for these courses/products and have them displayed on one page in a category view. Now I have the dates (in the product names) on one page, but each one has it’s own add-to-cart button. My second question: Is it possible to turn these add-to-cart buttons into checkboxes with only one add-to-cart-button beneath it?  It would be nice if somebody had a solution for one of the two problems so I could have the look I’d like.")*

> nicolas wrote: Hi,
>
>
> 2\. If you set the "Add to cart on listings" setting to "global", you'll have one quantity input for each product of listings and a global add to cart button at the bottom of the products listings:
> [ www.hikashop.com/support/documentation/5...html#display\_product](https://www.hikashop.com/support/documentation/54-hikashop-config.html#display_product)
> Now, granted it's an input field, not a checkbox. To have a checkbox would require some code customization.

Is there a way to transform this input field into a checkbox? I found the 'product/show_quantity.php' file I have to edit, but what do I have to change to make it work?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MTAxNjctcHJvZHVjdC12YXJpYW50cy1vci1wcm9kdWN0LWNhdGVnb3J5LXZpZXctcHJvYmxlbT90bXBsPW1hcmtkb3du) 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: 86593
- Thank you received: 14334
-
-

8 months 4 days ago [\#371065](#371065) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product variants or product category view problem](/forum/26-product-category-display/910167-product-variants-or-product-category-view-problem#371065 "-- HikaShop version -- : 6.3.0 -- Joomla version -- : 5.4.3 -- PHP version -- : 8.3.30 -- Browser(s) name and version -- : Firefox 148.0  I’m pretty new to HikaShop.  I import products (Moodle-Courses via Joomdle) and some of these products/courses are pretty much the same with the exception of the dates. I would like to have these courses displayed on one page with checkboxes or radio buttons next to the different dates and one add-to-cart button.  The normal way, I think, would be to have a product and than create variants of it. But these products already exist. And I need the original imported products because they are linked to the courses in Moodle. My first question is: Is it somehow possible to turn a product into a variant of another product?  I tried another way, created a category for these courses/products and have them displayed on one page in a category view. Now I have the dates (in the product names) on one page, but each one has it’s own add-to-cart button. My second question: Is it possible to turn these add-to-cart buttons into checkboxes with only one add-to-cart-button beneath it?  It would be nice if somebody had a solution for one of the two problems so I could have the look I’d like.")*

Hello,

You can create a view override of the &#96;show_quantity&#96; template to replace the quantity input with a checkbox when the global add-to-cart mode is used on listings.

Go to System &gt; HikaShop &gt; Display tab and edit it. In the override file, add the following code after the line &#96;$min_quantity = 0;&#96;:
Code:

if(!empty($this-&gt;global_on_listing)) { ?&gt; &lt;div class="hikashop_quantity_checkbox_div"&gt; &lt;input type="checkbox" id="&lt;?php echo $id; ?&gt;_checkbox" onchange="document.getElementById('&lt;?php echo $id; ?&gt;').value = this.checked ? 1 : 0;" /&gt; &lt;input id="&lt;?php echo $id; ?&gt;" type="hidden" value="0" class="hikashop_product_quantity_field" name="&lt;?php echo $name; ?&gt;"&lt;?php echo $formAttr; ?&gt; /&gt; &lt;/div&gt; &lt;?php return; }

This renders a simple checkbox that sets the hidden quantity field to 1 when checked and 0 when unchecked. The global add-to-cart button on the listing will then add only the checked products to the cart. On the product page, the normal quantity display will still be used.

The following user(s) said Thank You: [Gynta](/forum/user/84015-gynta "View Gynta's Profile")

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

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

Less More

- Posts: 4
- Thank you received: 1
-
-

8 months 4 days ago [\#371072](#371072) by [Gynta](/forum/user/84015-gynta "View Gynta's Profile")  Replied by *[Gynta](/forum/user/84015-gynta "View Gynta's Profile")* on topic *[Product variants or product category view problem](/forum/26-product-category-display/910167-product-variants-or-product-category-view-problem#371072 "-- HikaShop version -- : 6.3.0 -- Joomla version -- : 5.4.3 -- PHP version -- : 8.3.30 -- Browser(s) name and version -- : Firefox 148.0  I’m pretty new to HikaShop.  I import products (Moodle-Courses via Joomdle) and some of these products/courses are pretty much the same with the exception of the dates. I would like to have these courses displayed on one page with checkboxes or radio buttons next to the different dates and one add-to-cart button.  The normal way, I think, would be to have a product and than create variants of it. But these products already exist. And I need the original imported products because they are linked to the courses in Moodle. My first question is: Is it somehow possible to turn a product into a variant of another product?  I tried another way, created a category for these courses/products and have them displayed on one page in a category view. Now I have the dates (in the product names) on one page, but each one has it’s own add-to-cart button. My second question: Is it possible to turn these add-to-cart buttons into checkboxes with only one add-to-cart-button beneath it?  It would be nice if somebody had a solution for one of the two problems so I could have the look I’d like.")*

It worked! Thank You thank you thank you Danke schön Muchas Gracias!

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

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

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