From 199d8a44fc41bfa5885f71a7c8bc85622d7c1d28 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 28 Sep 2015 19:04:42 +0530 Subject: [PATCH] [fix] check doc.has_website_permission in order.html --- erpnext/public/js/shopping_cart.js | 2 +- erpnext/templates/pages/order.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/shopping_cart.js b/erpnext/public/js/shopping_cart.js index f52c296e3d..0c3049c7ce 100644 --- a/erpnext/public/js/shopping_cart.js +++ b/erpnext/public/js/shopping_cart.js @@ -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); diff --git a/erpnext/templates/pages/order.py b/erpnext/templates/pages/order.py index 36444d1f30..6c36e3ca7e 100644 --- a/erpnext/templates/pages/order.py +++ b/erpnext/templates/pages/order.py @@ -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)