Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 General help me questions
 Gift certificate with coupon
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bwalz
VP-CART New User

USA
82 Posts

Posted - December 14 2011 :  14:07:00  Show Profile  Visit bwalz's Homepage  Reply with Quote
It seems you cannot enter a coupon code when ordering a gift certificate. Is there a way to have to have the coupon field in checkout when ordering gift certificates?

diegomilito
VP-CART Expert

Argentina
779 Posts

Posted - December 14 2011 :  20:00:21  Show Profile  Reply with Quote
some modif needed, to enable coupon for the gift cert.

i will explain the steps of modif needed in step-by-step :

- edit shopgift2.asp

- after <!-- #include file="shopcustomerform.asp" -->
you ll need to insert new code :
<!-- #include file="shopcoupon.asp" -->

- after ShopCustomerForm, you ll need to insert new code (approx line 90-95):
AddDiscountCoupon

- after strPassword2 = CleanChars(Request.Form("strPassword2")), you ll need to insert new code (approx line 125-130):
strCoupon=CleanChars(request("strcoupon"))

- after ValidatePassword, you ll need to insert new code (approx line 170-175) :
ValidateCustCoupon

- at the very end of file, before %>, you ll need to insert new code :

sub AddDiscountCoupon
strcoupon=GetSess("coupon")
if GetConfig("xAllowCoupons")<>"Yes" then exit sub

'6.50 - hide coupon option if creating registry
if GetSess(REGISTRANTID)<>"" then exit sub
ShopWriteHeaderBox GetLang("langCustCouponPrompt")
CreateFieldSetRow GetLang("langCouponDiscount"),"strCoupon",strCoupon,"",""
ShopWriteFooterBox "yes"
end sub

sub ValidateCustCoupon
dim msg, rc
if strcoupon="" then exit sub
LocateCoupon strcoupon, rc, msg
if msg="" then
CouponValidateSpecial strcoupon,msg
if msg="" then
SetSess "coupon",strcoupon
else
strcoupon=""
SetSess "coupon",strcoupon
SError=SError & Msg & "<br />"
end if
else
SError=SError & Msg & "<br />"
strCoupon=""
SetSess "coupon",strcoupon
end if
end sub

can u follow my mentioned details code put into your file and tell me how.

Diego.
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