forked from drupalcommerce/commerce-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add checkout order summary page (drupalcommerce#92)
* Add checkout order summary page For drupalcommerce#34 * Add image and fix code block. * Fix h2
- Loading branch information
Showing
5 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,6 @@ Configuring your checkout | |
|
||
guest | ||
customize | ||
order-summary | ||
checkout-pane-plugin | ||
creating-a-checkout-flow-plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Changing the order summary | ||
========================== | ||
|
||
Checkouts, by default, display an order summary on specific steps. This summary is powered by a view which can be modified. This is the *Checkout Order Summary* (`commerce_checkout_order_summary`) view. Changing this view will change how the order is displayed in summary during checkout. | ||
|
||
.. figure:: images/order-checkout-summary.png | ||
:alt: Checkout Order Summary view | ||
|
||
Changing the view | ||
----------------- | ||
|
||
There is no user interface for changing the view provided. The view is added by the `CheckoutFlowBase` class when building the checkout flow form: | ||
|
||
.. code-block:: php | ||
if ($this->hasSidebar($step_id)) { | ||
$form['sidebar']['order_summary'] = [ | ||
'#type' => 'view', | ||
'#name' => 'commerce_checkout_order_summary', | ||
'#display_id' => 'default', | ||
'#arguments' => [$this->order->id()], | ||
'#embed' => TRUE, | ||
]; | ||
} | ||
To use a completely different view, you will need to use `hook_form_alter` to change the view name, or a provide a custom checkout flow plugin. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters