Skip to content

Commit

Permalink
Cart flow documented
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoszpietrzak1994 committed Feb 11, 2019
1 parent 7c0e68d commit 7faf166
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/book/orders/cart-flow.rst
@@ -0,0 +1,22 @@
.. index::
single: Cart flow

Cart flow
======

**Cart** in Sylius is an **Order** in the state ``cart``.
It represents an order that is in progress (not placed yet).

.. note::
Each user has their own cart when logged into Sylius. It can be cleared either by placing an order or removing items manually.

There are several cart flows, depending on the user being logged in or what items are currently placed in the cart.

* Not logged in user adds some items to the cart and then logs in as a customer whose cart had not been empty. **It will result in dropping the cart created by an unknown user and load the cart previously created by the logged in customer.**
* Not logged in user adds some items to the cart and then logs in as a customer whose cart had been empty. **It will result in setting the cart created by an unknown user as a cart that belongs to a logged in customer.**
* Logged in user adds some items to the cart and then logs out. **Once customer logs out, their cart is not transferred to a session that belongs to an unknown user.**

Learn more
----------

* :doc:`Carts API </api/carts>`
1 change: 1 addition & 0 deletions docs/book/orders/index.rst
Expand Up @@ -19,5 +19,6 @@ with a few additional ones, like promotions, payments, shipments or checkout in
shipments
payments
checkout
cart-flow

.. include:: /book/orders/map.rst.inc
1 change: 1 addition & 0 deletions docs/book/orders/map.rst.inc
Expand Up @@ -6,3 +6,4 @@
* :doc:`/book/orders/payments`
* :doc:`/book/orders/shipments`
* :doc:`/book/orders/checkout`
* :doc:`/book/orders/cart-flow`

0 comments on commit 7faf166

Please sign in to comment.