diff --git a/erpnext/templates/includes/cart.js b/erpnext/templates/includes/cart.js index 983898b457..4c35dd04a2 100644 --- a/erpnext/templates/includes/cart.js +++ b/erpnext/templates/includes/cart.js @@ -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); } } });