- Posts: 8
- Thank you received: 0
Ordering mixed cases
- volodigital
-
Topic Author
- Offline
Less
More
15 years 4 months ago #17516
by volodigital
Ordering mixed cases was created by volodigital
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
Some coding is acceptable as part of the solution. Thanks
Please Log in or Create an account to join the conversation.
15 years 4 months ago #17522
by nicolas
Replied by nicolas on topic Re: Ordering mixed cases
There is no option for that in HikaShop. You would have to edit the file cart of the view checkout via the menu Display->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:
Something like that:
Code:
$total = 0;
foreach($this->rows as $i => $row){ $total +=$row->cart_product_quantity; }
if($total%12){
$this->nextButton = false;
$app =& JFactory::getApplication();
$app->enqueueMessage('Please have in your cart a quantity of candy boxes divisible by 12');
}
Please Log in or Create an account to join the conversation.
Time to create page: 0.129 seconds