[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:
parent
352ab7c51b
commit
f36aba31e5
|
@ -33,7 +33,7 @@ $(document).ready(function () {
|
||||||
data: {lang: openerp.website.get_context().lang},
|
data: {lang: openerp.website.get_context().lang},
|
||||||
success: function (quantity) {
|
success: function (quantity) {
|
||||||
if (!$a.hasClass('js_goto_shop')) {
|
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");
|
var $q = $(".my_cart_quantity");
|
||||||
$q.parent().parent().removeClass("hidden", !quantity);
|
$q.parent().parent().removeClass("hidden", !quantity);
|
||||||
|
|
Loading…
Reference in New Issue