Adding a discount create a postback which empty all my customer information field.
Hello, I'm pretty new to MVC, Umbraco and Vendr in general. As a base to my project, I've used the Vendr Demo Store which work perfectly. I only saw a strange behavior when I'm in the Customer Information page. When you're there, you can add a gift card on the right side of the site. Doing so create a postback, and if there was any information already filled for the customer, they all get deleted in the process. Is there an easy way to fix this behavior in the Vendr Demo Store? Any help would be appreciated. Thanks!
This is expected behavior with the demo store setup as the discount code / customer information fields are two separate forms and so any post back from one will loose any un-persisted changes in the other.
Your two options are really are:
1) Combine the forms into one and try and handle both updating of the customer information and applying the gift card, although this could be problematic if the customer info is only half filled in.
2) Look at making the apply discount code run via an ajax request or similar so that you never actually leave the page when adding a discount.
The aim of the demo store was just to keep things as simple as possible so this was a compromise we made, but hopefully one of the above should make it work a little smoother for you.
Adding a discount create a postback which empty all my customer information field.
Hello, I'm pretty new to MVC, Umbraco and Vendr in general. As a base to my project, I've used the Vendr Demo Store which work perfectly. I only saw a strange behavior when I'm in the Customer Information page. When you're there, you can add a gift card on the right side of the site. Doing so create a postback, and if there was any information already filled for the customer, they all get deleted in the process. Is there an easy way to fix this behavior in the Vendr Demo Store? Any help would be appreciated. Thanks!
Hi Jean-Francois,
This is expected behavior with the demo store setup as the discount code / customer information fields are two separate forms and so any post back from one will loose any un-persisted changes in the other.
Your two options are really are:
1) Combine the forms into one and try and handle both updating of the customer information and applying the gift card, although this could be problematic if the customer info is only half filled in.
2) Look at making the apply discount code run via an ajax request or similar so that you never actually leave the page when adding a discount.
The aim of the demo store was just to keep things as simple as possible so this was a compromise we made, but hopefully one of the above should make it work a little smoother for you.
Hope this helps
Matt
is working on a reply...