mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-18 09:47:14 +00:00
fix(cart): Don't use window.open as it can be blocked
window.open calls are interpreted as popups by some browsers and are blocked. Also, route to Quotation web view instead of printview.
This commit is contained in:
@@ -162,8 +162,7 @@ $.extend(shopping_cart, {
|
||||
.html(msg || frappe._("Something went wrong!"))
|
||||
.toggle(true);
|
||||
} else {
|
||||
window.open('/orders/' + encodeURIComponent(r.message), '_blank');
|
||||
window.location.reload();
|
||||
window.location.href = '/orders/' + encodeURIComponent(r.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -186,8 +185,7 @@ $.extend(shopping_cart, {
|
||||
.html(msg || frappe._("Something went wrong!"))
|
||||
.toggle(true);
|
||||
} else {
|
||||
window.open('/printview?doctype=Quotation&name=' + r.message, '_blank');
|
||||
window.location.reload();
|
||||
window.location.href = '/quotations/' + encodeURIComponent(r.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user