Hoo boy, I've got a doozy of a problem here that I'm hoping someone can help out with.Here goes:
We've had our Aspdotnetstorefront (version 18.104.22.168) site up for quite some time now and we're currently working on enabling gift card functionality. Unfortunately, we continually get the error: "YOU HAVE ENTERED AN INVALID PROMOTION CODE (CODE)" despite the fact that it is in fact a valid gift card. I've also made sure that the DisallowCoupons AppConfig is set to false.
I should also mention that just getting the gift card section to show up on the checkout page ended up being a hassle. Cracking open the shoppingcart.aspx.cs file, I was forced to set the cart.CouponsAllowed variable to true right before it does it's check to decide whether to show that section or not. For some reason, despite the AppConfig being set correctly, it was coming up false.
Perhaps the strangest thing of all was the fact that I disabled one of my test coupons and I was finally able to apply it to an order....temporarily. It lost the card as soon as I continued the checkout process. But at least I wasn't getting the invalid code error anymore. To be sure, I'm at a complete loss as to what is going on here.
Now, throughout our Store's life, we've done a number of customizations, including third party add-ons, custom code to sync the login system with another site, and a full blown integration with Microsoft Dynamics GP via the Atlas system. So when time finally came to enable the default Storefront gift card functionality and it didn't work, I thought: well, one of these customizations must've done something to break gift cards. To check this, I setup another out-of-the-box Storefront staging site with no customizations. As I thought, the gift card functionality worked perfectly.
I decided to use that stock install and slowly add the same customizations to it to see if and when it would break so I could further debug from there. To my dismay, none of the actual code customizations broke it. However, copying the database over to the new stock install is what finally did the trick. Unfortunately, I'm at a loss as to what could possibly be inside the database that's breaking it.
I'm willing to share code if necessary, but I feel that it's not necessary since I eliminated that possibility. Does anyone have any ideas or thoughts as to what could possibly be happening here?