Minimum order size

  • Posts: 5
  • Thank you received: 0
13 years 4 months ago #3560

Hello,

I'm in the business of selling t-shirts with prints, but in a rather large scale.... if that is...

So I would like to have an option to say that a cart must contain at least lets say 10 products, before it can be check out.

Is that already possible, or what is needed to make it so?

Please Log in or Create an account to join the conversation.

  • Posts: 81604
  • Thank you received: 13082
  • MODERATOR
13 years 4 months ago #3561

Hi,

There is no option for that.
However, you can edit the file cart of the view checkout via the menu Display->Views to do that by changing the code.
There you can count the number of products in the cart and hide the "next" button when the count is lower than 10. The next button can be hidden with that code:

$this->nextButton=false;
You could also display a message...

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0
13 years 4 months ago #4395

Hi Nicolas,

Sorry... Could just be me that is not enought strong within PHP, but where would you like me to make the changes, and what should they exactly be?

Minimum 15 products
with the text "Sorry, you need to buy a minimum total of 15 products"

Please Log in or Create an account to join the conversation.

  • Posts: 81604
  • Thank you received: 13082
  • MODERATOR
13 years 4 months ago #4396

You can edit the file cart of the view checkout via the menu Display->Views and add the code:

$total = 0;
foreach($this->rows as $row){
 $total +=$row->cart_product_quantity;
}
if($total<15){
 $this->nextButton=false;
 $app =& JFactory::getApplication();
 $app->enqueueMessage('Sorry, you need to buy a minimum total of 15 products');
}

Please Log in or Create an account to join the conversation.

Time to create page: 0.060 seconds
Powered by Kunena Forum