[FIX] website_Sale_options: fix regexp to redirect after the add to cart.

Previous regexp was done on the complete url and not the path name.
In the case of a domain with tld .shop, it didn't work.

This commit closes #14756
This commit is contained in:
Jeremy Kersten 2016-12-20 09:55:38 +01:00
parent 352ab7c51b
commit f36aba31e5
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ $(document).ready(function () {
data: {lang: openerp.website.get_context().lang},
success: function (quantity) {
if (!$a.hasClass('js_goto_shop')) {
window.location.href = window.location.href.replace(/shop([\/?].*)?$/, "shop/cart");
window.location.pathname = window.location.pathname.replace(/shop([\/?].*)?$/, "shop/cart");
}
var $q = $(".my_cart_quantity");
$q.parent().parent().removeClass("hidden", !quantity);