In 1.x the cart summary was a pane which embedded a view.
In 2.x we should not use a pane, because we want to allow the cart summary to be shown on multiple steps.
For example, a checkout flow that splits "Order information" into "Shipping information" and "Payment method" would want the summary on both pages.
I suggest the following:
- Add a "has_cart_summary" flag to steps.
- Add a buildCartSummary($form, $form_state) method to checkout flows.
- If the current step has a cart summary, call that method. By default it embeds a view.
- Add a template which puts the cart summary in a right column, while keeping the panes in a left column
This will allow people who want editable cart summaries to override buildCartSummary() and provide a non-views-based solution.
Comment | File | Size | Author |
---|---|---|---|
#7 | Order_information___Site-Install.png | 44.24 KB | mglaman |
#5 | Order_information___Site-Install.png | 71.58 KB | mglaman |
#5 | add_a_cart_summary-2710985-5.patch | 20.96 KB | mglaman |
#4 | add_a_cart_summary-2710985-4.patch | 18.22 KB | mglaman |
Comments
Comment #2
pashupathi nath gajawada CreditAttribution: pashupathi nath gajawada as a volunteer and at Melity commentedComment #3
mglamanThere hasn't been any progress posted in 25 days. Taking this over and working on it today.
Comment #4
mglamanInitial work. Working through the UI now, then tests.
Comment #5
mglamanPatch, and screenshot. We should do a follow up to add a "summary" view mode to orders and use that in the default view.
Comment #6
mglamanPR: https://github.com/drupalcommerce/commerce/pull/387
Comment #7
mglamanUpdated PR with default summary view mode and config.
Comment #8
mglamanIn PR discussion changed from cart summary to order summary.
Comment #10
bojanz CreditAttribution: bojanz at Centarro commentedBoom!