Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

adding 2 to quantity when "add to cart" is clicked


iiooii

Recommended Posts

my store limits the customers to buy things in even numbers. "2/4/6...10"

however when user clicks on "add to cart" , it only adds quantity of 1 to the cart.

is there any way i can change the code so that it adds quantity of 2 when customer clicks on "add to cart" ?

Link to comment
Share on other sites

Look in:

 

/includes/classes/shopping_cart.php

 

Change:

function add_cart($products_id, $qty = '1', $attributes = '', $notify = true) {

 

to

 

 

function add_cart($products_id, $qty = '2', $attributes = '', $notify = true) {

 

 

 

That should work....

Dan

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...