Skip to content

Commit

Permalink
Add checkout order summary page (drupalcommerce#92)
Browse files Browse the repository at this point in the history
* Add checkout order summary page

For drupalcommerce#34

* Add image and fix code block.

* Fix h2
  • Loading branch information
mglaman authored Jul 12, 2017
1 parent 9e40c71 commit c8fe2e6
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"restructuredtext.builtDocumentationPath" : "_build/html",
"restructuredtext.confPath" : ".",
"restructuredtext.builtDocumentationPath" : "${workspaceRoot}/_build/html",
"restructuredtext.confPath" : "${workspaceRoot}",
"restructuredtext.updateOnTextChanged" : "true",
"restructuredtext.sphinxBuildPath": "sphinx-build",
"python.linting.pylintEnabled": false
Expand Down
Binary file added v2/checkout/images/order-checkout-summary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions v2/checkout/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ Configuring your checkout

guest
customize
order-summary
checkout-pane-plugin
creating-a-checkout-flow-plugin
26 changes: 26 additions & 0 deletions v2/checkout/order-summary.rst
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.
2 changes: 2 additions & 0 deletions v2/product/customize-the-shopping-cart-block.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ The ``commerce_cart.layout.css`` and ``commerce_cart.theme.css`` files provide t


.. highlight:: html

libraries-override:
commerce_cart/cart_block:
css:
Expand All @@ -52,6 +53,7 @@ Or to completely disable the Cart stylesheet:


.. highlight:: html

libraries-override:
commerce_cart/cart_block:
css:
Expand Down

0 comments on commit c8fe2e6

Please sign in to comment.