Jump to content

Page Refresh Issue With Coupon Codes.


Recommended Posts

We have been working on our checkout page and integrating AwoDev's Coupon and Gift Cert Module. 

 

For some reason with one page checkouts if there is a coupon code in the cart there are refresh issues. For example, if you have a code in the cart and you select another shipping method the page refreshes. If you toggle back to another shipping method the page refreshes. 

 

If there is no code in the cart this does not happen. We don't think that is a problem with the AwoDev module because this happens when you are using the built in Prestashop cart rules to create discount codes as well. This also happens with gift cert codes. Any code will create this issue.  

 

There is some issue with coupon codes in the cart and the page refreshing. This does not happen if you remove the code from the cart. Has anybody had this problem and if so how can it be fixed? 

 

We are using 1.6.0.8.

 

Need help on this.

 

Thank you. 

Link to comment
Share on other sites

On or around line 812 of /[your store]/themes/[your theme]/js/cart-summary.js see the code I commented out.  This is where the reload is happening on one-page checkout.  I don't know if this will cause problems with something else, but it definitely fixes the reload problem when there is a discount applied to the cart.

	if (!discount_count)
	{
		$('.cart_discount').each(function(){$(this).remove();});
		$('.cart_total_voucher').remove();
	}
	else
	{
		if ($('.cart_discount').length == 0)
		{
			//location.reload(); REMOVED TO PREVENT RELOADING
		}
  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...