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
 Automatic Coupons
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

andysuch
Starting Member

United Kingdom
7 Posts

Posted - April 26 2007 :  13:34:48  Show Profile  Visit andysuch's Homepage  Reply with Quote


I need to create a coupon that is sent to the customer when they first register.

I think I know how automatically to create the coupons in the database when a new user registers and have the coupon code automatically included in the new registration email, although any assistance here would be useful.

What I don’t know how to do is set up a coupon with my specific needs.

What I need is:

a coupon that can only be used once by the customer who registers (couponcustomers filed)

The coupon should be for 20% up to a maximum value of £200 and this is where I am stuck. You seem to be able to set either a percentage or a value but not a combination of both.

Can anyone help.

Thanks,

Andy.

Alan F
VP-ASP New User

102 Posts

Posted - April 27 2007 :  05:06:27  Show Profile  Visit Alan F's Homepage  Reply with Quote
Hi

I would set up a coupon as normal and then put the details of the coupon in the tmp_welcomeemail.txt

Best Regards

Alan
Go to Top of Page

andysuch
Starting Member

United Kingdom
7 Posts

Posted - April 27 2007 :  06:09:30  Show Profile  Visit andysuch's Homepage  Reply with Quote
Hi,

I have worked out how I would create a new one time only use coupon for each new user when they register, that part seems reasonably easy to do with some additions to the asp in to ‘shopcustregister.asp’. Although haven’t attempted this yet.

What I also may implement is disabling the discount coupon until the admin has verified the account details (try and stop someone registering multiple times to get multiple discounts)

What I need to work out is how to set a maximum value for the discount coupon, I have added a new field to the coupons table ‘couponmaxamount’ and this will define the maximum value a percentage based coupon could be used up to i.e. 20% up to the value of £200.

What I need to work out is how to implement the maximum value field when performing the checkout. Can anyone shed any light on this or which asp scripts need to be looked at.

Many thanks,

Andy.
Go to Top of Page

andysuch
Starting Member

United Kingdom
7 Posts

Posted - March 15 2009 :  07:40:05  Show Profile  Visit andysuch's Homepage  Reply with Quote
When I first setup the site we decided not to go with the coupons for the time being as we did not have the plus pack.

Circumstances have changed and I now have to implement this.

The coupon should be a percentage of the value with a maximum capped amount for example 20% up to £200 discount, so £500 would give £100 discount, £1000 would give £200 discount but anything over £1000 would still only give the maximum discount of £200 i.e. £2000 would still give a discount of £200.

The percentage part is obvious, you put the figure 0.2 in the ‘couponpercent’ field.

In preparation I have added the field ‘couponmaxamount’ as mentioned in my post above, what I need to know is where to implement the calculation.

Which script do I need to look at and edit which does the coupon calculations.

Thanks in advance.



Go to Top of Page

andysuch
Starting Member

United Kingdom
7 Posts

Posted - March 15 2009 :  10:00:04  Show Profile  Visit andysuch's Homepage  Reply with Quote
For anyone interested I found the answer:

All the coupon functions are held in the file ‘shopcoupon.asp’

I added the new field to the ‘GetCouponFields’ sub:

couponmaxamount = objrs("couponmaxamount")
if isnull(couponmaxamount) then couponmaxamount = 0

then added the check to the discount amount whenever it was calculated based on a percentage

discount=Totalamount*couponPercent (existing code)

if couponmaxamount > 0 and discount > couponmaxamount then discount = couponmaxamount


Hope it helps.
Go to Top of Page

dwight
VP-ASP New User

USA
143 Posts

Posted - May 14 2009 :  00:47:45  Show Profile  Reply with Quote
Andy,
does the code you wrote work of "amount" also. And if so could you give more details on where you put the code. I am new and the more info you share the better.

Thanks
Dwight
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000