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

#   Ordering mixed cases

##

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

Less More

- Posts: 8
- Thank you received: 0
-
-

15 years 4 months ago [\#17516](#17516) by [volodigital](/forum/user/2585-volodigital "View volodigital's Profile")  *[Ordering mixed cases](/forum/4-how-to/17516-ordering-mixed-cases#17516 "I have a shop which sells wholesale. They products are sold in case lots, but a case can consist of any combination of products within that class. If a case can hold 12 boxes of candy, we have 4...")* was created by *[volodigital](/forum/user/2585-volodigital "View volodigital's Profile")*

I have a shop which sells wholesale. They products are sold in case lots, but a case can consist of any combination of products within that class. If a case can hold 12 boxes of candy, we have 4 different types of candy, how can I set it up to allow for an order of cases which can be made of a combination of any quantity of the 4 types of candy as long as it is divisible by 12.

Some coding is acceptable as part of the solution. Thanks

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

Less More

- Posts: 86289
- Thank you received: 14265
-
-

15 years 4 months ago [\#17522](#17522) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Ordering mixed cases](/forum/4-how-to/17516-ordering-mixed-cases#17522 "I have a shop which sells wholesale. They products are sold in case lots, but a case can consist of any combination of products within that class. If a case can hold 12 boxes of candy, we have 4...")*

There is no option for that in HikaShop. You would have to edit the file cart of the view checkout via the menu Display-&gt;Views and add some check in order to make sure that the user can only checkout when he has a total quantity divisible by 12 and if not, not display the "next" button of the checkout and display an error message.
Something like that: Code:

$total = 0; foreach($this-&gt;rows as $i =&gt; $row){ $total +=$row-&gt;cart_product_quantity; } if($total%12){ $this-&gt;nextButton = false; $app =&amp; JFactory::getApplication(); $app-&gt;enqueueMessage('Please have in your cart a quantity of candy boxes divisible by 12'); }

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

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

[](#top)
