Welcome, Guest ( Customer Panel | Login )




 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

4679 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
0 Item(s)
$0.00