Buy One Get One Free

Buy One Get One Free

Shopdiscount.asp is used to calculate a discount for a customer. Discount calculations are done by default when a customer logs in and the discount has a non zero value for that customer. The discount field is in the customer record. Shopuserprice.asp is used to calculate discounts based on the quantity ordered.

Shopcustomerprices.asp is used to alter the price based on a specific customer.

Shopuserprice.asp is used to alter the prices based on the quantity purchased but can also be used to alter the prices based on any other criteria you choose.

Free Product on a given quantity
One or two values can be placed in the level3 field. The first number is the quantity that must be purchased. The second is optional. It is the catalogid of the free product. If it is not supplied the customer is given a free copy of the product itself.

You will also need to ensure that the configuration setting
xcartspecialhandling = YES
in your shop configuration settings.

You should also check that the value of xcartspecialhandlingfield refers to level3.

Buy X get X free

The VP-ASP system currently uses the "Buy X get 1 Free" scenario, and is used for merchants who wants to offer a free product after the customer purchases a certain amount, e.g. as an incentive to buy bulk.

To modify it so that whatever quantity is added to the cart is also reflected in the number of free products they receive (e.g. Get 3 get 3 free), the following changes need to be made to shopcartspecialhandling.asp:

Locate line 100:
Newcart(cquantity, newcartcount)= 1

Change it to:
Newcart(cquantity, newcartcount)= arrCart(cQuantity,i)

Locate line 152:
Newcart(cQuantity,newcartcount) = 1

Change it to:
Newcart(cQuantity,newcartcount) = arrCart(cQuantity,i)


Times Viewed:
2982
Added By:
Steve Baldwin
Date Created:
10/6/2005
Last Updated:
6/21/2006