Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
Does anyone implement e-commerce with extended users module with couchcms?
Basically I am looking for a solution to have e-commerce store with products listing, user module with SSO and order management. Appreciate any help/guide.

Thanks,
Asha
Hi Asha,

I don’t have experience with SSO, but everything else is certainly possible (and I think I’ve seen SSO mentioned elsewhere in the forum, so I imagine that’s possible too). Couch has Couch Cart, which can assist in keeping tracking of the user’s cart activity while they’re logged in. With Couch Cart, you’ll have access to tags like <cms:pp_cart_items>, which can output useful cart variables similar to how the <cms:pages> tag does.

However, Couch itself does not have a “native” order management system (although I think KK has hinted at adding something like this in the future).

In the meantime though, you could model a handful of templates yourself to keep track of your users’ checkout flows and their respective relationship between orders, products, checkouts, etc. Then use those templates to retrieve data from later (like when a user logs back in):
- users.php
- products.php
- orders.php
- checkout-sessions.php
- invoices.php
- payments.php

As the user proceeds through various “states” during the checkout flow, you could use <cms:db_persist /> to persist these moments to your clonable templates. For instance, your orders.php template might include a one-to-one relationship to users.php, a one-to-many relationship to products.php, and a radio select to keep track of the order’s “state”, like “pending” (user hasn’t checked out yet), “submitted” (user has been sent to PayPal/wherever for payment), or “paid” (you site received payment confirmation from PayPal/wherever). This way, if the user logs out, you’d still have access to where their order is at and what products, etc it contains.

That’s just one of many ways you could model things.

If you’re not already familiar, I’d also recommend studying Stripe’s “vocabulary” for describing the moment-to-moment relationships between customers, products, product-prices, invoices, invoice-line-items, checkout-sessions, payment-intents, etc. Stripe isn’t natively integrated with Couch, but could still be integrated with <cms:php> tags. Just be sure to keep your Stripe credentials private (like in the couch/config.php file).

Even if you don’t (or can’t) use Stripe, a review of how they relate all these parts of the e-commerce flow may give you some insight into how you could structure your own flow using Couch.

If you need further assistance, we can work out something privately, or maybe someone else can chime in with their thoughts.

Hope this helps,
Matthew
Thank you @mwlarkin1 for detailed reply.

Yes. I started the work accordingly, hope to finish it successfully. Will update the progress here.

I did a basic e-commerce site(https://safalaman.com) few years back with couchcms, with COD and customize options. But never tried something with extended user modules in couchcms.
3 posts Page 1 of 1
cron