OrchardCore.Commerce icon indicating copy to clipboard operation
OrchardCore.Commerce copied to clipboard

Checkout using workflows instead of specific MVC actions (OCC-50)

Open bleroy opened this issue 6 years ago • 9 comments

Checkout is the process of transforming a shopping cart into an order.

The checkout experience should be based on workflows. The default checkout experience should be defined by a recipe that sets up a workflow, that can then be modified.

The following workflow activities will be necessary:

  • Navigate to cart page
  • Navigate to shipping page (not all checkout workflows will have a separate shipping page)
  • Navigate to payment (not all checkout workflows will have this)
  • Set shipping method
  • Pay / create order

Jira issue

bleroy avatar Oct 26 '18 22:10 bleroy

Hi @bleroy ,

What would the default checkout experience be like using workflows ? It is something like GoToCart => Go To Shipping => Payment => Create Order

KshitizGIT avatar Jun 03 '21 11:06 KshitizGIT

From the customer's point of view, yes, more or less, and building it as a workflow means it's easy to create variations of that. Don't forget taxes though. From the seller's point of view, that's just the beginning of the workflow of course, but that's a different problem.

bleroy avatar Jun 03 '21 18:06 bleroy

To be more specific, we need new activities covering those steps, and we need a setup recipe that creates the default checkout workflow. Then we need the UI that triggers it all, and that accompanies the activities.

bleroy avatar Jun 03 '21 18:06 bleroy

Makes sense.. I am trying to build the activities first . But without the shipping implementation, and payment implementation, most of the work will be TBD

KshitizGIT avatar Jun 04 '21 13:06 KshitizGIT

Hello everyone!

I'm working on integrating Stripe payment, and I noticed that the order content type is unfinished. I'm reworking that.

What should an order content item store? It's already storing addresses, that's okay. I'm thinking about statuses like "shipped, arrived, paid, payment failed" etc., and other basic things, like data from the Stripe payment (transaction id) and the ordered products.

What do you think?

DemeSzabolcs avatar Jul 11 '22 19:07 DemeSzabolcs

@DemeSzabolcs A standard status seems reasonable, just make sure the admissible values can be configured and we don't assume a fixed set. Extensibility, as always, should be the main concern: each business will have different requirements for their orders. Separate the concerns into specialized content parts and fields as relevant and express the base scenario in the content type creation recipe (currently the shipping and billing addresses are added as fields).

A typical online business' orders will have:

  • status with history of changes
  • notes
  • a list of products with quantities and attributes as extracted from a shopping cart (this can be edited)
  • a customer's info such as name and address
  • To integrate with checkout, we should have a part or field for referencing the payment (again, different businesses will have different requirements: some will have one credit card charge, others will have options for cash, purchase order, etc.).
  • Shipping info

The content type should be versioned, but the history of status changes might deserve special handling because it's so important.

Of course, any operation on orders should be integrated with workflows.

bleroy avatar Jul 11 '22 19:07 bleroy

status with history of changes

For the history of changes, Orchard Core Audit Trail seems like a good idea, at least for now. It keeps track of the changes in content items.

DemeSzabolcs avatar Jul 20 '22 17:07 DemeSzabolcs

Isn't this done, @sarahelsaig?

Piedone avatar Dec 13 '23 15:12 Piedone

We have a checkout, but it's a series of MVC actions in a rigid order. I think the original idea of the issue is still valuable, that it should be a collection of workflow activities, to make the whole checkout flow customizable. I've updated the issue title accordingly.

sarahelsaig avatar Dec 26 '23 12:12 sarahelsaig