Author |
Topic |
|
inkjets-n-toner
Starting Member
15 Posts |
Posted - July 15 2006 : 23:17:03
|
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
4679 Posts |
Posted - July 17 2006 : 19:02:08
|
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 |
|
|
inkjets-n-toner
Starting Member
15 Posts |
Posted - July 18 2006 : 09:18:14
|
Thanks Michael, I have made both modifications to the coupon processing routines and they work like a charm ! |
|
|
aperkins
Starting Member
USA
7 Posts |
Posted - October 26 2006 : 02:00:22
|
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
|
|
|
|
Topic |
|