VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Customization
 Coupons - enhancements ?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

inkjets-n-toner
Starting Member

15 Posts

Posted - July 15 2006 :  23:17:03  Show Profile  Reply with Quote
Has anyone modified the coupon routine to handle the following?
1 - Free Shipping + Discount
2 - Customer can only use the coupon 1 time

Any help would be greatly appreciated !

support
Administrator

4266 Posts

Posted - July 17 2006 :  19:02:08  Show Profile  Visit support's Homepage  Reply with Quote
Hi,

Both of these coupon discount methods will require customization of the code.

The first one could possibly be achieved by resetting the shipping to $0 in the ApplyDiscount subroutine in shopcoupon.asp.

This is achieved by modifying the smprice session variable.

eg.

setsess "smprice",0

The second coupon discount method you refer to, will involve customization if you want one general coupon to be able to be used by multiple customers however only have each customer be able to use that discount once. This customization could potentially be quite involved.

To set a limit on an individual coupon however is as easy as placing a value in the couponlimit field for that particular coupon.

Thank you

Regards,

Michael
VPASP SUPPORT
Go to Top of Page

inkjets-n-toner
Starting Member

15 Posts

Posted - July 18 2006 :  09:18:14  Show Profile  Reply with Quote
Thanks Michael,
I have made both modifications to the coupon processing routines and they work like a charm !
Go to Top of Page

aperkins
Starting Member

USA
7 Posts

Posted - October 26 2006 :  02:00:22  Show Profile  Reply with Quote
Free Shipping + Discount
This would be great for me as well. but I can't make it work

I tried
setsess "smprice",0
in ApplyDiscount subroutine and it wouldn't work for me. I'm using ver 5. could you tell me on what line to insert it? Sorry, I don't know ASP very well.

Sub ApplyDiscount (prodquantity, prodprice)
dim discount, coupondiscount, totalprice
CouponDiscount=GetSess("couponDiscount")
If isnull(couponpercent) then
couponpercent=0
end if
If couponpercent<>0 then
Totalprice=ProdPrice*ProdQuantity
Discount=TotalPrice*couponpercent
else
If isnull(couponamount) then
couponamount=0
end if
If couponamount>prodprice then
couponamount=prodprice
end if
Discount=couponamount*prodQuantity
If discount> GetSess("ordertotal") then
discount=GetSess("ordertotal")
end if
end if
Coupondiscount=couponDiscount+discount
Setsess "coupondiscount", coupondiscount
end sub
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000