Skip to content

Commit c8fe2e6

Browse files
authored
Add checkout order summary page (#92)
* Add checkout order summary page For #34 * Add image and fix code block. * Fix h2
1 parent 9e40c71 commit c8fe2e6

File tree

5 files changed

+31
-2
lines changed

5 files changed

+31
-2
lines changed

Diff for: .vscode/settings.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"restructuredtext.builtDocumentationPath" : "_build/html",
3-
"restructuredtext.confPath" : ".",
2+
"restructuredtext.builtDocumentationPath" : "${workspaceRoot}/_build/html",
3+
"restructuredtext.confPath" : "${workspaceRoot}",
44
"restructuredtext.updateOnTextChanged" : "true",
55
"restructuredtext.sphinxBuildPath": "sphinx-build",
66
"python.linting.pylintEnabled": false

Diff for: v2/checkout/images/order-checkout-summary.png

264 KB
Loading

Diff for: v2/checkout/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ Configuring your checkout
66

77
guest
88
customize
9+
order-summary
910
checkout-pane-plugin
1011
creating-a-checkout-flow-plugin

Diff for: v2/checkout/order-summary.rst

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Changing the order summary
2+
==========================
3+
4+
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.
5+
6+
.. figure:: images/order-checkout-summary.png
7+
:alt: Checkout Order Summary view
8+
9+
Changing the view
10+
-----------------
11+
12+
There is no user interface for changing the view provided. The view is added by the `CheckoutFlowBase` class when building the checkout flow form:
13+
14+
.. code-block:: php
15+
16+
if ($this->hasSidebar($step_id)) {
17+
$form['sidebar']['order_summary'] = [
18+
'#type' => 'view',
19+
'#name' => 'commerce_checkout_order_summary',
20+
'#display_id' => 'default',
21+
'#arguments' => [$this->order->id()],
22+
'#embed' => TRUE,
23+
];
24+
}
25+
26+
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.

Diff for: v2/product/customize-the-shopping-cart-block.rst

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ The ``commerce_cart.layout.css`` and ``commerce_cart.theme.css`` files provide t
4242

4343

4444
.. highlight:: html
45+
4546
libraries-override:
4647
commerce_cart/cart_block:
4748
css:
@@ -52,6 +53,7 @@ Or to completely disable the Cart stylesheet:
5253

5354

5455
.. highlight:: html
56+
5557
libraries-override:
5658
commerce_cart/cart_block:
5759
css:

0 commit comments

Comments
 (0)