You would need to download the add on on see if you can customize it for your needs ...
You can use the function:
$chk_products_count = $_SESSION['cart']->get_quantity($products_id);
where $products_id is the products_id you want to check ...
Something like this can count how many for products_id 10 and 12 are in the cart:
Code:
$chk_product_count = 0;
$chk_product_count += $_SESSION['cart']->get_quantity(12);
$chk_product_count += $_SESSION['cart']->get_quantity(10);
echo 'Products Count 10, 12: ' . $chk_product_count . '<br>';
You could then use the value of $chk_product_count and if > 1 but less than 4, the person cannot checkout ...
The add on is for a minimum amount but you can adapt it to be whatever you want ...
Bookmarks