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

#   Mixed Products in Multiples of Six

##

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

Less More

- Posts: 4
- Thank you received: 2
-
-
- [](https://webilicious.com.au)
-

6 years 6 months ago [\#319024](#319024) by [ozneilau](/forum/user/3680-ozneilau "View ozneilau's Profile")  *[Mixed Products in Multiples of Six](/forum/27-checkout/899840-mixed-products-in-multiples-of-six#319024 "-- HikaShop version -- : 4.2.3 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.3.17 -- Browser(s) name and version -- : Firefox 76.0.1  Similar to   www.hikashop.com/forum/4-how-to/17516-ordering-mixed-cases.html , my client wishes to sell wine in multiples of 6 bottles to fit their packaging.  Clients should be able to choose from a number of different wines such as five of one type and one of another or three of each to make a total of 6 or 12 etc.  I have edited the cart file of the checkout view to create an override for the active template (see attached image).  This is not working as intended so I'm not sure if I have inserted the code in the wrong place or the wrong file.  I would really appreciate some help.  Thanks.")* was created by *[ozneilau](/forum/user/3680-ozneilau "View ozneilau's Profile")*

-- HikaShop version -- : 4.2.3
-- Joomla version -- : 3.9.18
-- PHP version -- : 7.3.17
-- Browser(s) name and version -- : Firefox 76.0.1

Similar to [ www.hikashop.com/forum/4-how-to/17516-ordering-mixed-cases.html](https://www.hikashop.com/forum/4-how-to/17516-ordering-mixed-cases.html), my client wishes to sell wine in multiples of 6 bottles to fit their packaging.

Clients should be able to choose from a number of different wines such as five of one type and one of another or three of each to make a total of 6 or 12 etc.

I have edited the cart file of the checkout view to create an override for the active template (see attached image).

This is not working as intended so I'm not sure if I have inserted the code in the wrong place or the wrong file.

I would really appreciate some help.

Thanks.

[ ![screenshot-saltwaterriverwines.com.au-2020.05.13-14&#95;52&#95;53.png](/forum/attachment/49347) ](/forum/attachment/49347 "...3-14&#95;52&#95;53.png")

- [ ![screenshot-saltwaterriverwines.com.au-2020.05.13-14&#95;52&#95;53.png](/forum/attachment/49347) ](/forum/attachment/49347 "...3-14&#95;52&#95;53.png") [ ](/forum/attachment/49347?download=1 "...3-14&#95;52&#95;53.png")

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

6 years 6 months ago [\#319028](#319028) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Mixed Products in Multiples of Six](/forum/27-checkout/899840-mixed-products-in-multiples-of-six#319028 "-- HikaShop version -- : 4.2.3 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.3.17 -- Browser(s) name and version -- : Firefox 76.0.1  Similar to   www.hikashop.com/forum/4-how-to/17516-ordering-mixed-cases.html , my client wishes to sell wine in multiples of 6 bottles to fit their packaging.  Clients should be able to choose from a number of different wines such as five of one type and one of another or three of each to make a total of 6 or 12 etc.  I have edited the cart file of the checkout view to create an override for the active template (see attached image).  This is not working as intended so I'm not sure if I have inserted the code in the wrong place or the wrong file.  I would really appreciate some help.  Thanks.")*

Hi,

That's the correct code in the correct place.
However, this code change will only work if you have the "checkout legacy" setting activated and use the old checkout system of HikaShop.
The new checkout system uses other view files as it works completely differently from the old checkout.
With the new checkout, you'll want to edit the file checkout / show.php via the menu Display&gt;Views and add such code at the top: Code:

$cart = $this-&gt;checkoutHelper-&gt;getCart(); $total = 0; foreach($cart-&gt;products as $i =&gt; $row){ $total +=$row-&gt;cart_product_quantity; } if($total%6){ $app = JFactory::getApplication(); $app-&gt;enqueueMessage('Please order in multiples of 6 bottles'); return; }

Note that this will hide the checkout interface when the quantity is not correct.

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

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

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

Less More

- Posts: 4
- Thank you received: 2
-
-
- [](https://webilicious.com.au)
-

6 years 6 months ago [\#319055](#319055) by [ozneilau](/forum/user/3680-ozneilau "View ozneilau's Profile")  Replied by *[ozneilau](/forum/user/3680-ozneilau "View ozneilau's Profile")* on topic *[Mixed Products in Multiples of Six](/forum/27-checkout/899840-mixed-products-in-multiples-of-six#319055 "-- HikaShop version -- : 4.2.3 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.3.17 -- Browser(s) name and version -- : Firefox 76.0.1  Similar to   www.hikashop.com/forum/4-how-to/17516-ordering-mixed-cases.html , my client wishes to sell wine in multiples of 6 bottles to fit their packaging.  Clients should be able to choose from a number of different wines such as five of one type and one of another or three of each to make a total of 6 or 12 etc.  I have edited the cart file of the checkout view to create an override for the active template (see attached image).  This is not working as intended so I'm not sure if I have inserted the code in the wrong place or the wrong file.  I would really appreciate some help.  Thanks.")*

This is working perfectly.

Thanks so much for the quick response and keep up the good work!

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

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