Skip to main content

Minimum order size

More
15 years 9 months ago #3560 by cbotved
Minimum order size was created by cbotved
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.

More
15 years 9 months ago #3561 by nicolas
Replied by nicolas on topic Re: Minimum order size
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:
Code:
$this->nextButton=false;
You could also display a message...

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

More
15 years 8 months ago #4395 by cbotved
Replied by cbotved on topic Re: Minimum order size
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.

More
15 years 8 months ago #4396 by nicolas
Replied by nicolas on topic Re: Minimum order size
You can edit the file cart of the view checkout via the menu Display->Views and add the code:
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.168 seconds
Powered by Kunena Forum