that looks interesting.
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.
@ccraig I did something to berio-topo.com 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.
I saw the Presta Shop integration was passing cookies.
What stack is berio-topo using? My Wappalyzer app just shows ERPNext and Frappe. Does that mean you’re using Webshop?
@ccraig yes, we are using the webshop!
We did a lot of fixes and improvements, but definitivelly, yes is the pure webshop!
I also thought Vue Storefront and MedusaJS were good candidates to enhance / augment the eCommerce offering in Frappe.
I’ve declined an opportunity to submit a proposal / quote recently because Webshop is “untested” and just too new, especially for a very large collection of items with various dimensions such as colour, and packaging options.
What concerns me most is the SEO capabilities for such a large collection of items and how that would be achieved / optimised?
So, I’m following this topic with great interest…
Hi Craig,
I’ve been quite on the same track.
Do you wanna have a casual call to toss some design ideas around?
Cheers!
Yes, I’d love a chat!
My latest update is that I’m playing with Vendure (headless ecommerce) using this SvelteKit based store front stater.
It’s been around longer than MedusaJS and seems a bit more complete. However, next week on the 9th, MedusaJS said they are announcing version 2.0.
I also want to include part of a message I sent in the Telegram Webshop group:
There is merit to having two separate backends. Some benefits are:
- If ERPNext goes down (bug/update breaks it/data corruption/server outage/hacker) your eCommerce site is still up and vice versa.
- Heavy traffic load on your eCommerce won’t affect your ERPNext.
- You may want your eCommerce hosted on the edge or geographical locations for performance and load balancing.
So I may continue down the Vendure path in order to I have a separation of concerns.
As mentioned above, MedusaJS just announced version 2.0 today. Looks like the fixed a lot of the pain points. Will be interesting to see how it compares to Vendure.
Yes what a coincidence. I just posted in another thread that MedusaJS have released v2 a few hours ago.
Thanks for reviving this topic and keeping it on the radar. I’m eager to see how we can get ERPNext & Medusa to be integrated.
I do echo all the phrases regarding ERPNexts built in eCommerce. It’s awesome yet lacks alot of capabilities also with notable bugs present, nonetheless.
Also, many of us will be running ERPNext on local servers on site. So serving a website from it would not be possible.
Using Medusa/Vendure prevents vendor lock in and allows for deployment to the edge. Really opens up a lot of flexibility and customization!
Not to be outdone by MedusaJS’s 2.0 announcement, Vendure has just released version 2.2 which has a lot of performance improvements and customization features for the Admin. Looking forward to playing with it.
I just want to drop for interested parties to appreciate that
- feat: enable a new payment controller by blaggacao · Pull Request #40845 · frappe/erpnext · GitHub is designed to enable
- refactor: clarify architecture & implement PayZen by blaggacao · Pull Request #53 · frappe/payments · GitHub
- which in turn is designed to enable modern payment checkout (which could then potentially be adopted by
frappe/webshop
)
Cheers!