Shopping Cart Logic

I am open to being a bad user here, but I am wondering if I am using the system correctly or if there is a setting that I am not aware of to solve this issue: (note I am running version 11 on and where this problem is literally blocking revenue everyday.)

Full disclosure, this issue may have existed before the update to version 11, but I wasn’t paying close enough attention. :wink:

ISSUE: The shopping cart on a site like doesn’t allow someone to checkout without first registering.

The problem is that when someone adds to the cart, they get redirected to the login page. That is fine in theory, although the text to create an account could be enhanced since new users may not have the patience to scan carefully for the “Don’t have an account?” text.


From a marketing perspective many ecommerce types of sites would have a more user friendly balance approach to the create vs. login options. (like

However the real issue is that if someone does find and follow the link they get directed to enter their full name and email and then click the sign up button:


After they click sign up the system notifies them that they need to check their email for verification:


Once the user closes that verification pop up they are left back at the sign up screen with a green success indicator - which is nice, but ultimately this page is a dead end AND the shopping process is non-existent from that point.

If the site cart check out page allowed them to enter their billing and or shipping addresses and payment information and checkout, even without verifiying their email it would act more like a typical ecommerce experience.

They would have to goto their email, verify, then return to the site, login and then start the add to cart process all over. Plus the adding of addresses is not an obvious or normal flow for ecommerce checkout which adds to the confusion of customers.

For a casual ecommerce shopper this is an unbearable burden.


Do we have alternative check out flows that can help a user make a purchase and use the shopping cart without having to jump through so many hurdles?

As always if there needs to be enhancements made I am willing to support the cost to develop those.

Thank you in advance for your advice or counsel.


I just came across this thread and I would sure love if the user did not have to create account and do all that before they could purchase. it will stop a lot of sales I fear.

instead on the shopping cart page is all the info needed to create the account via Ajax.

1 Like

I am facing this problem too.

I do not want to require a user account to be able to get a sales quote/invoice

Many eCommerce websites allow you to checkout as a guest.
Not to mention the poor workflow of restarting your shopping kart after logging in.


any traction on this issue? this is HUGE stopping point in using erpnext for us

1 Like

An alternative I’m looking at right now is using the Python Oscar shopping cart and building some API linking to ERPNext to update products and use ERPNext for “ERP”, but not for front-end shopping cart. :smiley:

1 Like

I ran into the same situation. Another option would be to check out e.g. Vue Storefront, which is a nice storefront system with goodies like offline mode. ERPNext could be integrated with it as a backend system. I found an ERPNext module for it, but it seems incomplete: GitHub - vijaywm/vsf-erpnext: vuestorefront api for Erpnext


I would think it be far better to fix the last few little things in erpnext cart so we’re all using vanilla option and progressing that instead of spreading thin.


In an ideal world. But this issue has been around for a long time.
And me personally can’t spend time on learning Frappee to build a nicer shopping cart experience at the moment.

I wonder how much of a bounty it would require

In my opinion, it is better to separate the ERP from the web shop. Intensive store must be very well optimized for SEO and must scale well (in high seasons you need a lot of computing power).

A better solution will be to create a synchronizer with the already existing platforms of the Internet sales.


This is why I suggested to take a look at Vue Storefront. They are building a backend agnostic storefront on the Vue Storefront Next branch, you can check it out here:

This way ERPNext could leverage all the development that goes into the storefront, and our job would be “only” to provide a backend connector. This is still non-trivial, but much simpler than building a similar experience from scratch.


that looks interesting.

the has been a good tip to look at.

dredging this topic up again… we NEED guest checkout on the stock ERPNext shopping cart…


I would love to see this options as well. It would streamline the shopping experience. Its a lot of hustle for users to sign up to just use a shopping cart.

update: I think Social Login kinda solves this problem. Users can easily sign up using Facebook or Google not wasting time. Its also beneficial for us since we can quickly collect the user information.

I’ve been studying this over the past two weeks.

Currently, the cart requires login because it stores you “cart” in a Quotation. The quotation is saved to the database and therefore requires a Party/Customer to be set. This is a great feature because a user can logout and come back to where they left off…that is if they are registered.

I’ve run some tests and it is possible to have a Quotation calculate Discounts and Taxes without saving it to the database.

So I’ve been going back and forth on the idea of creating a “guest cart” app that works along side Webshop or giving up and using a 3rd party platform. Though I want to avoid a solution that requires “syncing”. Vue Storefront claims no syncing, seems to be more like a read-only version of your data, but I have not read if I can authenticate via Frappe.

The Guest Cart would basically have the same API as Webshop, but the whitelisted methods would have “allow_guest” set to true and have simpler features. Also, store the cart in LocalStore on the browser for non-logged in users. Though adding a “Guest Cart” doctype accessed via a guest session id store in LocalStore would allow the contents to be used in the background and to re-market abandoned carts. One downside is that the abandoned carts would build-up overtime, as opposed to just keeping the data on the user’s browser.

You would then need only a few endpoints. Here’s a rough idea.

  • /calculate_cart
    • Pass the cart contents
    • Create a Quotation (guest_quot) object filled with cart items and eventually address.
    • Returns the updated values based on guest_quot.run_method(“set_price_list_and_item_details”) and guest_quot.run_method(“calculate_taxes_and_totals”)
    • Store the results in LocalStorage or call on demand when viewing the cart page.
  • /place_order
    • Post your custom checkout form page’s data (items, billing/shipping addresses, shipping method, payment method transaction ID (using something like Stripe/Braintree on the same page)
    • Do any pre-validation you deem necessary on the incoming data
    • Create the Customer record
    • Create the Sales Order (I’m not sure it’s necessary to get Quotation involved at this point)

Reason why I’ve not gone ahead is the close coupling Webshop has with its JS and HTML. All the functions basically check if you’re a guest and redirect you. Also, I do not like how Webshop uses an JS API call on the frontend to grab products, that’s way too slow. I thought the site was broken and then all of a sudden the products show up…

I’m not completely saying no, but I’m also going to be taking a closer look at Vue Storefront this week. However, it seems like making it work with ERPNext is close to just writing a headless cart API anyways. I’ve been studying MedusJS too and wondering, well, why not just add the same API endpoints that Medusa has to Frappe? It does mean that it would require more technical skills to implement as apposed to just dropping in Webshop having product pages without any coding.


If you go for VueStorefront integration I’ll try to help.


Reading up on it now. Odoo uses it, so it should be fairly straightforward getting Frappe integrated.


Yep, but that’s not that easy. At least for me.

1 Like

@ccraig I did something to on the past!

We created a dummy lead, that was using some kind of a cookie, to identify the not authenticated user, with that we create a quote on the ERP, but each quote is tight to that “cookie”, so when the user logs in, the quote is moved for the right lead or the right customer.