Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Limit cart to 4 products


Guest

Recommended Posts

Does anyone know how I can limited the cart to 4 products only. I am renting out dvd's and need the limit to be 4.

 

Regards,

Carl

Link to comment
Share on other sites

go to application_top.php and look for occurances of

 

$cart->add_cart

 

and put

 

if ($cart->count_contents < 4)

 

that should do it

Link to comment
Share on other sites

go to application_top.php and look for occurances of

 

$cart->add_cart

 

and put

 

if ($cart->count_contents < 4)

 

Do you mean replace '$cart->add_cart ' with 'if ($cart->count_contents < 4)' or place it in front. ie 'if ($cart->count_contents < 4) $cart->add_cart ...'

 

Ive tried both. When placed in front everything works ok, but still allows me to add more than 4 products.

 

When I have replaced it, I get error saying Unexpected ','

 

Any ideas.

Carl.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...