1and1 Help Centre Categories

print article

How to make sure a minimum quantity or amount is ordered overall before checkout

Problem: You want a shopper to purchase a minimum number of products or spend
minimum amount to be able to checkout. For eg:, there has to be at least 10 products
in the cart or £100.00 total to checkout.

Minimum items:Go to 'Settings' -> 'Advanced Settings' -> 'Payment methods' -> 'Second rule for the basket': Enter the rule


if ($total_number_of_products < 10)
$SHOW_ORDERBUTTON = FALSE;

meaning a mim of 10 products is required, else the Order button is not displayed

OR


if ($total_sum < 100)
$SHOW_ORDERBUTTON = FALSE;

meaning a min of £100.00 purchase is required, else the Order button is not displayed

ORYou can combine the both as follows:


if ($total_number_of_products > 10 || $total_sum > 100)
$SHOW_ORDERBUTTON = TRUE;
else
$SHOW_ORDERBUTTON = FALSE;

meaning if one of the condition is satisfied show the Order button