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:
commit
9cce19a65c
@ -162,8 +162,9 @@ $.extend(shopping_cart, {
|
|||||||
.html(msg || frappe._("Something went wrong!"))
|
.html(msg || frappe._("Something went wrong!"))
|
||||||
.toggle(true);
|
.toggle(true);
|
||||||
} else {
|
} else {
|
||||||
window.open('/orders/' + encodeURIComponent(r.message), '_blank');
|
$('.cart-container table').hide();
|
||||||
window.location.reload();
|
$(btn).hide();
|
||||||
|
window.location.href = '/orders/' + encodeURIComponent(r.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -186,8 +187,9 @@ $.extend(shopping_cart, {
|
|||||||
.html(msg || frappe._("Something went wrong!"))
|
.html(msg || frappe._("Something went wrong!"))
|
||||||
.toggle(true);
|
.toggle(true);
|
||||||
} else {
|
} else {
|
||||||
window.open('/printview?doctype=Quotation&name=' + r.message, '_blank');
|
$('.cart-container table').hide();
|
||||||
window.location.reload();
|
$(btn).hide();
|
||||||
|
window.location.href = '/quotations/' + encodeURIComponent(r.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user