When coupon code entered and "Apply Code" is clicked, the coupon is not applied

I have a client with an ecommerce site using MarketPress. She just set up a coupon and sent out a newsletter with the coupon code, but the coupon isn't working. I have copied the live site to a staging site and the problem occurs there as well. I'm granting Support Access to the staging site: http://spiritdancer.staging.wpengine.com

This is urgent. She has gotten emails from customers complaining about the coupon not working.

Thanks,
Richard

  • Tyler Postle
    • CGO

    Hey Richard,

    Thanks for creating a staging site. I tested it with all your plugins deactivated and also your theme, still same issue. Which leads me to believe it could be due to caching, or perhaps one of the mu-plugins in the /wp-content/mu-plugins folder. Can you temporarily remove those mu-plugins and also delete the advanced-cache.php file from your /wp-content/ then check if the coupon works or not.

    The caching could be server side as well, you may want to ask your host if you can turn off caching temporarily - you might have an option for that in the control panel.

    Talk to you soon.

    Cheers,
    Tyler

  • richard_norby3
    • Site Builder, Child of Zeus

    Hi Tyler,
    I tried disabling and clearing all cache. That didn't work. I even disabled the CDN and purged again. I can't do anything with the MU plugins because they are required by the host (WP Engine). I copied the site to a local install and will try more things there, but so far I'm having the same thing happen.
    Thanks!
    Richard

  • Tyler Postle
    • CGO

    Hey Richard,

    Did the coupon field work before? I see you've rolled back to the last version and it's still not working.

    The support access token has become invalid now. Could you revoke and regrant that access? Then I can have another look.

    Do you see any errors in your server logs?

    If you could send in your FTP credentials for your staging site then I can get one of our developers involved too and further dig into the issue.

    You can send that privately through our contact form: https://premium.wpmudev.org/contact/

    Select "I have a different question" for your topic - this and the subject line ensure that it gets assigned to me :slight_smile:

    Send in:

    Subject: "Attn: Tyler Postle"
    -WordPress admin username
    -WordPress admin password
    -login url
    -FTP credentials (host/username/password)
    -link back to this thread for reference
    -any other relevant urls

    **If you keep support access active then no need to send in wp-admin

    Talk to you soon!

    Cheers,
    Tyler

  • richard_norby3
    • Site Builder, Child of Zeus

    Hi Tyler,
    I'll send SFTP creds. Here's the current status. I've been able to get the gift certificate to apply by unchecking the option "Use Built-In Lightbox for Images?". Interestingly, if I go back later and check it again, it still seems to work. However, since updating to the latest version, I now have another problem, which is that on the "Cart" page, in the "Estimated Total" box, the estimated total field does not add in any of the product values. (see attached) But, if I continue on with checkout, in the "Review Order" screen in the "Payment" section it shows the correct total. (see attached). But when continuing on to PayPal, it returns an error saying "10413 - The totals of the cart item amounts do not match order amounts." I've done this locally with all plugins, mu-plugins, and drop-ins turned off. It doesn't seem to matter. I've reactivated support access. This one is kicking my but!
    Thanks!
    Richard

  • Tyler Postle
    • CGO

    Hey Richard,

    Glad you managed to find a way around that coupon issue. I tried turning that lightbox option on and off but it didn't make any difference for me, it still worked in both situations. I'll keep an eye out for any similar issues and let us know if it comes back.

    As for the new issue, I'm able to replicate that as well - appears to be a bug with the estimated shipping, very sorry about this! I'm reporting it to the developer and making sure they are aware that it's an urgent issue so we can get it fixed up and released right away.

    Any further questions in the meantime just let us know.

    Cheers,
    Tyler

  • richard_norby3
    • Site Builder, Child of Zeus

    Hi Tyler,
    I'm going to reinitialize my staging site from the live site and continue trying to find the problem. If anyone goes on the staging site they should feel free to try whatever they want, since it's not the live site.
    Thanks!
    Richard

  • richard_norby3
    • Site Builder, Child of Zeus

    I just installed MarketPress on my local machine. A fresh install, with 2015 as the theme, no plugins except WPMU Dev Dashboard and MarketPress. I set up a coupon code and tried to use it. When I tried to submit to PayPal I got: 10413 - The totals of the cart item amounts do not match order amounts. (see attached image) So, I'm getting a bit frustrated. My client is angry; it's holiday buying season, her biggest time of year and it's getting screwed up by the coupon code. Pleas help ASAP.

  • richard_norby3
    • Site Builder, Child of Zeus

    FYI, with this problem, and problems with Membership2, and Events+, I'm looking pretty bad to my clients and this may cause me business. I know I'm going to have to refund money to my Spirit Dancer client. It's all since the latest big round of changes. I think maybe they should have been tested more thoroughly, or put out as beta for a while.

  • Tyler Postle
    • CGO

    Hey Richard,

    I've let the developer know about the shipping issue and it will be looked into asap. It seems to only affect the table rate shipping option. If you temporarily swap to flat rate or another option then it should work fine. The coupon shouldn't be whats causing that totals don't match error, it's the table rate shipping.

    Are you have any other issues with coupons still? I will be happy to look into those if so.

    Either myself or the developer will reply back here once the table rate shipping issue is fixed up.

    Cheers,
    Tyler

  • Jose
    • Bruno Diaz

    Hi Richard,

    Hope you are doing great.

    I made some improvements in the gateway to avoid this and other possible errors.

    The fix will be released soon. In the meantime, I'm attaching a patched version so that you can have your site up and running immediately.

    You only need to replace the plugin files via FTP.

    Any feeddback would be much appreciated. Let me know if you need help installing the plugin.

    Thanks,
    José

  • mgr34t
    • Design Lord, Child of Thor

    Hi Jose,
    I have just updated the plugin and having the same issue. Just downloaded the patch and uploaded it via FTP. It doesn't work - I'm still getting the error.
    FYI My products are digital so there's no shipping or coupons and I'm still getting this error. Payments are via Paypal express. Do you have the previous version of the plugin so I can re-instate it until you make the fix working?
    Thanks

  • Amber Lea Starfire
    • Design Lord, Child of Thor

    I am experience the exact same problem -- same error, any coupon. Market press will accept the coupon and apply the discount, but when the customer tries to complete the transaction, and when Marketpress transfers the information to PayPal Express, the API error occurs.

    Please let me know as soon as you have a fix for this. It's extremely embarrassing since I sent out a coupon code recently.

  • Amber Lea Starfire
    • Design Lord, Child of Thor

    I am experiencing the exact same problem -- same error, any coupon. Market press will accept the coupon and apply the discount, but when the customer tries to complete the transaction, and when Marketpress transfers the information to PayPal Express, the API error occurs.

    Transactions without coupons go through just fine.

    Please let me know as soon as you have a fix for this. It's extremely embarrassing since I sent out a coupon code recently.

    • Tyler Postle
      • CGO

      Hey Amber,

      I'm not able to reproduce this either, could you grant support access so I can see your settings? That way I can make sure my test is the exact same as your site.

      You can grant support access via WPMU DEV > Support > Support Access > Grant Access.

      Look forward to hearing back!

      Cheers,
      Tyler

      • Amber Lea Starfire
        • Design Lord, Child of Thor

        @Tyler Postle, I have been waiting to see if WPMUDEV fixes this problem S.ice so many people are experiencing it, it's a bug. Still ongoing.

        When applying a coupon, everything seems fine, until the user clicks the Continue button to go to Paypal. That is when the error code (same as screen shots above for RichardNorby3) appears and the sale cannot proceed.

        I have granted access. I look forward to a resolution. Thanks.

  • Greg
    • The Exporter

    Folks,

    I did not fully checkout with Paypal but I finally was able to get to PayPal without initial errors from MarketPress. Still need to test full checkout. This is after applying @Jose patch above https://premium.wpmudev.org/forums/topic/when-coupon-code-entered-and-apply-code-is-clicked-the-coupon-is-not-applied?replies=18&bb_attachments=1001180&bbat=81651

    HOWEVER, I still notice though...that when clicking on remove from cart button the item with NOT remove FYI. Are you guys working on that?

    :slight_smile:

    P.S. In case it matters, here is our shipping setup (as I heard some shipping options may cause issues)? Here: http://screencast.com/t/h8pGeIE4w

  • Tyler Postle
    • CGO

    @Amber - do you have the table rate shipping option active? I think this might be related to your issue. Either way, can you try the patched version of MarketPress that Jose posted here: https://premium.wpmudev.org/forums/topic/when-coupon-code-entered-and-apply-code-is-clicked-the-coupon-is-not-applied#post-1001180

    You can delete your current version of MarketPress and upload that one via: Plugins > Add New > Upload.

    I think that will fix your issue and we will be officially releasing it soon :slight_smile:

    HOWEVER, I still notice though...that when clicking on remove from cart button the item with NOT remove FYI. Are you guys working on that?

    I'm not seeing this on my install, Greg. I used the same shipping settings you have too. Have you created a new ticket on it? If not, could you? https://premium.wpmudev.org/forums/#question

    Then we can investigate it further and it won't get lost inside this thread :slight_smile:

    Talk to you soon!

    Cheers,
    Tyler

  • Amber Lea Starfire
    • Design Lord, Child of Thor

    Hey Tyler et al,

    No, I didn't have the table rate shipping option active.

    t finally tried that patch ... (wanted to wait until i had time to deal with potential fallout) ... and it completely broke my site. Couldn't even log in (it just kept recycling to the login page). Had to access my site via my cpanel and delete the Marketpress folder. That fixed it so I could login and then re-installed the old version of Marketpress -- the one that doesn't work with coupons but works okay without coupons. At least I can log in now.

    So when are we going to have a fix for the paypal coupon problem?

    WPMUDEV really needs to fix this problem. It's too bad I built my online classes with coursepress pro - I feel really stuck with this broken mess, and every time there's an update to either coursepress pro or one of the other related plugins, something breaks.

  • Jose
    • Bruno Diaz

    Hello Amber Lea Starfire,

    I'm really not sure why the previous beta broke your site.

    I'm attaching here a clean beta that I just packaged which contains the most recent fixes.

    If possible, remove the previous version via ftp ( keep a backup in case you need to restore it ) and upload the one attached here.
    And please clear your browser cookies before testing.

    I'll wait for your feedback and try to fix any remaining glitch as soon as possible.

    Thanks,
    José

  • Amber Lea Starfire
    • Design Lord, Child of Thor

    Hi Jose,

    I finally learned how to create a local staging site and installed the patch here. When I click the Continue button to pay with PayPal, I'm now getting this error (see screen shot). This happens with or without a coupon, so I suspect it's due to it being a staging site. Can you help me get past this so I can see if the patch works for coupons?

    Thanks,

    Amber

  • Nastia
    • Support Rock Star

    Hello @astarfire

    I trust you are doing well today!

    I've tested the patch on my installation and was redirected right away on the PayPal page. This error you seeing, mostly occurs because of incorrect API credentials are inserted in the Marketpress Settings.

    Please check out your PayPal API settings. If you are using Sandbox PayPal account, please make sure that you are using Sandbox credentials.

    Same for the Live account, please double check them if they are correct.

    Let us know how it went!

    Cheers,
    Nastia

  • Amber Lea Starfire
    • Design Lord, Child of Thor

    Because of the staging site, I created a new PayPal sandbox account and used those credentials for the store settings. That solved the security header error. And I was able to get to the PayPal payment screen without a coupon. However, with a coupon, I still ended up with the old 10413 error. <sigh> Even after activating the patched version of MarketPress.

    Now what?

  • tomtranmer
    • Design Lord, Child of Thor

    Hi guys,

    same issue for me.

    Site works well and checks out with no issues with no coupon, as soon as the coupon is applied, then the Paypal Error about amounts not adding up are returned.

    I will attempt the patch from April by Jose, but please advise, client needs a fix for this issue asap.

    Just FYI, the issue is still the same following the patch application.

  • Jose
    • Bruno Diaz

    Hello Tom,

    Hope you are doing great.

    We just released MarketPress 3.0.0.8, which includes all the patches above and a lot of other fixes focused specially in the checkout worflow.

    Please update the plugin in your install, clear browser cookies just in case, and give it a go.
    I'll be here to help if there is any remaining issue.

    Thanks,
    José

  • tomtranmer
    • Design Lord, Child of Thor

    Hey Jose,

    thanks for the follow up.

    Unfortunately the site was already at 3.0.0.8 as I had updated when I noticed the issue. I reapplied the plugin, cleared all caches and tried to load the site in a private window, but the same error was displayed.

    Please advise on next steps for coming up with a resolution to this problem.

  • Jose
    • Bruno Diaz

    Hello again Tom,

    I was finally able to reproduce and spot the issue. It seems that the problem occurs only for coupons configured to be applied to each applicable item once per cart". (see screenshot).

    I'm working with the lead dev to find a solution asap. In the meantime, it should work correctly if you use the option "Apply to each applicable item and quantity ordered".

    I'll let you know when we have a proper solution for this.

    Thanks for you patience,

    José

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.