mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-17 17:26:43 +00:00
Merge pull request #17438 from netchampfaris/cart-route
fix(cart): Don't use window.open as it can be blocked
This commit is contained in:
@@ -162,8 +162,9 @@ $.extend(shopping_cart, {
|
||||
.html(msg || frappe._("Something went wrong!"))
|
||||
.toggle(true);
|
||||
} else {
|
||||
window.open('/orders/' + encodeURIComponent(r.message), '_blank');
|
||||
window.location.reload();
|
||||
$('.cart-container table').hide();
|
||||
$(btn).hide();
|
||||
window.location.href = '/orders/' + encodeURIComponent(r.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -186,8 +187,9 @@ $.extend(shopping_cart, {
|
||||
.html(msg || frappe._("Something went wrong!"))
|
||||
.toggle(true);
|
||||
} else {
|
||||
window.open('/printview?doctype=Quotation&name=' + r.message, '_blank');
|
||||
window.location.reload();
|
||||
$('.cart-container table').hide();
|
||||
$(btn).hide();
|
||||
window.location.href = '/quotations/' + encodeURIComponent(r.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user