Coupon Code Issue

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
mfreeze
Commodore (COMO)
Commodore (COMO)
Posts: 421
Joined: Mon Jan 24, 2005 2:07 pm
Location: Washington, NJ
Contact:

Coupon Code Issue

Post by mfreeze » Fri Feb 03, 2012 11:55 am

One of my clients entered a new coupon code after being upgraded to 7.07 SR1a. Now there is an issue when a non-logged in customer (anonymous user) uses the code. The code is accepted and the discount applied but 2 messages below appear on the screen.

Payment MethodCoupon or Promotional Code

Invalid coupon code.

Coupon accepted.

If the customer is logged in this doesn't happen. If you want to test it, the site is www.ezsox.com.
Mary E Freeze

Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development

http://www.ffgraphics.com

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Coupon Code Issue

Post by AbleMods » Mon Feb 06, 2012 10:50 am

I've seen this before when there are multiple coupons set up with the same coupon code.

Some sites will have a monster number of coupons configured in the admin. AC7 doesn't check for duplicate coupon codes when a coupon is created. So in situations where the coupon list goes into multiple pages, it becomes far easier to create duplicate coupons by mistake.

Probably one version of the coupon is valid for that basket and the other one isn't, thus the confusing error message.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
mfreeze
Commodore (COMO)
Commodore (COMO)
Posts: 421
Joined: Mon Jan 24, 2005 2:07 pm
Location: Washington, NJ
Contact:

Re: Coupon Code Issue

Post by mfreeze » Mon Feb 06, 2012 11:54 am

I checked and she has 3 coupon codes EZ20, EZ40 and EZMB50 (which has expired). So that does not appear to be the issue.

Can comebody from Able look at this issue?
Mary E Freeze

Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development

http://www.ffgraphics.com

User avatar
Shopping Cart Admin
AbleCommerce Admin
AbleCommerce Admin
Posts: 3055
Joined: Mon Dec 01, 2003 8:41 pm
Location: Vancouver, WA
Contact:

Re: Coupon Code Issue

Post by Shopping Cart Admin » Mon Feb 06, 2012 2:05 pm

Hello Mary,

http://help.ablecommerce.com/faqs/ablec ... a_bug_.htm

I only see one change to coupons and that was on the multiple page checkout.
http://help.ablecommerce.com/upgrades/a ... ease_1.htm
Thanks for your support

Shopping Cart Guru
AbleCommerce.com
Follow us on Facebook

User avatar
mfreeze
Commodore (COMO)
Commodore (COMO)
Posts: 421
Joined: Mon Jan 24, 2005 2:07 pm
Location: Washington, NJ
Contact:

Re: Coupon Code Issue

Post by mfreeze » Tue Feb 07, 2012 10:20 am

We found the problem. One of my programmers had at the customer's request, moved the coupon dialog to just above the payment information.

This caused the double posting of the message. We moved it to another location higher on the page and it solved the problem.
Mary E Freeze

Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development

http://www.ffgraphics.com

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Coupon Code Issue

Post by AbleMods » Tue Feb 07, 2012 10:44 am

Interesting, thanks for posting the solution.

The coupon user control is supposed to test for such a scenario. At least that's what I thought when I looked at the code as shown below:

Code: Select all

    protected void Page_Init(object sender, EventArgs e)
    {
        string valueFromPost = Request.Form[ApplyCouponButton.UniqueID];
        if (valueFromPost == this.ApplyCouponButton.Text)
        {
            // APPLY COUPON WAS CLICKED, INTERCEPT BEFORE OTHER PROCESSING
            ApplyCoupon();
            Context.Items["CouponApplied"] = true;
        }
        PageHelper.SetDefaultButton(CouponCode, ApplyCouponButton.ClientID);
        CouponCode.Attributes.Add("autocomplete", "off");
    }

    protected void ApplyCouponButton_Click(object sender, EventArgs e)
    {
        if (!Context.Items.Contains("CouponApplied"))
        {
            ApplyCoupon();
        }
        CouponCode.Text = string.Empty;
    }
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Coupon Code Issue

Post by jmestep » Wed Feb 08, 2012 8:42 am

The code Joe mentions was in older versions of Able so maybe it needs to be added to your checkout page.
This is good info- someone had asked me about the issue and I couldn't figure out why it was happening. I've also wondered why the code was added to 707 and now I know!
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

Post Reply