Refresh Product Details page after adding to cart?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
I would like all dropdowns, text boxes and other items on a product detail page to be cleared out after a user adds the product to their cart.  Right now, it displays a dynamic notification that the item was added and does not redirect to the shopping cart page, as intended.  

If I were to navigate off the product details page and then return back, then all the pre-selected items and text is cleared.  I'd like to achieve that same effect without leaving the page and, ideally, via Ajax instead of a hard refresh.

Is there a way to reset the values via ajax without having to do a hard page refresh on the product details?
3 years ago
mtcg wrote:
does not redirect to the shopping cart page, as intended.

If you did want to do this change the setting shoppingcartsettings.displaycartafteraddingproduct to true

Otherwise there is an ajax call after add to cart so you maybe able to do what you want
i.e. you can update the price based on attributes
3 years ago
Thanks, Yidna.  I believe the approach I'll take is to fire a page refresh after the user has clicked "addtocart" via the notification message JS call.  (i.e. refresh the page if the notification message is marked as a "success.").
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.