Ordering mixed cases

  • Posts: 8
  • Thank you received: 0
13 years 5 months ago #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 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 or Create an account to join the conversation.

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
13 years 5 months ago #17522

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:

$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.037 seconds
Powered by Kunena Forum