<p><code>craft.commerce.orders</code> returns an element criteria model that defaults to setting the criteria param <code>isCompleted</code> to true. </p>

<p>You would need to set <code>isCompleted</code> to false on the criteria to override it, in order to get someone else's cart from the front-end.</p>

CC BY-SA 3.0
2016-09-27T12:33:58.143Z
2016-09-27T12:33:58.143Z
Luke Holder
<p>I am having difficulty moving the user's cart over to being an order. I understand that a cart is essentially an order with <code>isCompleted</code> set to <code>false</code> and no date set but I can't seem to access anything when setting <code>orders = craft.commerce.orders</code>, etc. I can see the cart on the backend along with the guest's email but cannot get orders. I can easily get the current cart and all my products have a price of $0 if that is relevant.</p>

<p>Thanks!</p>

CC BY-SA 3.0
2016-09-26T18:55:32.307Z
Is this in the context of a plugin (PHP) or the front-end (Twig)? Can you provide some relevant template/PHP code to show what you're currently doing?
Brad Bell
CC BY-SA 3.0
2016-09-27T14:00:46.523Z
This is using twig. Currently I'm using {% set cart = craft.commerce.cart %} and then successfully adding to it through my product pages using a POST for /updateCart. After the user has added all the items he/she wants then I want them to be able to checkout... or at least move to a different order status so I can have an email sent.
William Shanks
<plugin-craftcommerce>
Moving from Cart to Order
# Moving from Cart to Order

(Asked by: username_0 on 2016-09-26)

I am having difficulty moving the user's cart over to being an order. I understand that a cart is essentially an order with `isCompleted` set to `false` and no date set but I can't seem to access anything when setting `orders = craft.commerce.orders`, etc. I can see the cart on the backend along with the guest's email but cannot get orders. I can easily get the current cart and all my products have a price of $0 if that is relevant.

Thanks!

**Tags:** plugin-craftcommerce
> **Comments:**
> **username_1**: Is this in the context of a plugin (PHP) or the front-end (Twig)? Can you provide some relevant template/PHP code to show what you're currently doing?  
> **username_0**: This is using twig. Currently I'm using {% set cart = craft.commerce.cart %} and then successfully adding to it through my product pages using a POST for /updateCart. After the user has added all the items he/she wants then I want them to be able to checkout... or at least move to a different order status so I can have an email sent.  

---

## 1 answers

### Answer by username_2 on 2016-09-27. Score: 1

`craft.commerce.orders` returns an element criteria model that defaults to setting the criteria param `isCompleted` to true.

You would need to set `isCompleted` to false on the criteria to override it, in order to get someone else's cart from the front-end.


---

