Welcome to Vortx Community Forum, where you can ask questions and receive answers from the staff at Vortx and other members of the community.

If you had a user account on our previous forums website, you will need to register a new account here.

Learn more about...

AspDotNetStorefront
DotFeed

Gift card functionality acting up

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 9.3.1.0) 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?

Thanks!
asked Sep 3, 2014 in MultiStore by DDM486 (555 points)

2 Answers

+1 vote
 
Best answer
This is a little old, but I figured I'd update this with what I finally found out. I simply overlooked the fact that customer levels have a setting called "level allows promotions on orders" that was set to No for the specific level I had been using. Boy do I feel stupid now, but at least it's all set now.
answered Oct 6, 2014 by DDM486 (555 points)
0 votes
Hi there,

Since it is the database that broke it, make sure all your database upgrade scripts have been run properly and one or two of them didn't fail.

If they have, my first suspect would be either the datatype or field length related to your gift cards or promotions is different in the original database.
answered Sep 3, 2014 by pligon (1,750 points)
Thanks for the comment. I haven't actually ran any database upgrade scripts. When I copied the database from the one site to the stock staging site, I simply overrode the original database. I did check on the datatype/field length for the Gift card table, but they are all the same as the original stock db.
...