Merge pull request #4076 from anandpdoshi/shopping-cart-order

check doc.has_website_permission in order.html. Merge after frappe/frappe#1316
This commit is contained in:
Anand Doshi 2015-09-28 19:40:17 +05:30
commit 142859f36e
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ $(function() {
$.extend(shopping_cart, {
update_cart: function(opts) {
if(!full_name) {
if(!full_name || full_name==="Guest") {
if(localStorage) {
localStorage.setItem("last_visited", window.location.pathname);
localStorage.setItem("pending_add_to_cart", opts.item_code);

View File

@ -14,5 +14,5 @@ def get_context(context):
context.parents = frappe.form_dict.parents
if not context.doc.has_permission("read"):
if not context.doc.has_website_permission("read"):
frappe.throw(_("Not Permitted"), frappe.PermissionError)