Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Minimum Order?


vincenzonardone

Recommended Posts

never mind i sorted it, here goes...

 

put this in shopping_cart.php

 

 

<?php
// if there is less than 5 in the customers cart display this msg
if ($cart->count_contents() < 5) {
$test="<b>You must have more than 5 items in your cart to proceed to checkout</b>";
print ("$test");
}
?>

Vincenzo Nardone

Link to comment
Share on other sites

oh and i forgot to mention that you put this in

 

checkout_shipping.php

 

 

// if there is less than 5 in the customers cart display this msg
 if ($cart->count_contents() < 5) {
   tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
 }

 

 

q: "Will this check to add minimum 5 pieces same item code or 5 pieces minimum in the cart of various item code?? "

 

a: 5 pieces minimum in the cart of various item code

 

 

basically any mixture of items.

 

 

i've only just started using php and would probably suggest adding a check for the item code or whatever it's defined as whilst doing the cart check.

Vincenzo Nardone

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...