Checkout
- AddToCart --> termek a Kosar (Order)-ba kerul --> Ar nelkul!!
- Kosar - oldalon, lekerjuk az OrderItemeket, es a kapcsolodo termekek arat !!
- Majd a Continue to Checkout-kor, minden egyes alkalommal OrderItembe elmentjuk a termekarat
CART >> CHECKOUT >> ORDER relationship
A checkout/create event is fired when a checkout is initiated. That means that a user proceeds from their cart to checkout and the cart line items are "transferred" to the checkout line items. As the user enters data throughout the stages of checkout, personal details, shipping, shipping address, payment method, billing address etc. the checkout/update fires.
The orders/create event is fired once the checkout is completed i.e. the user successfully completes all checkout steps and is presented with the checkout order summary screen. However, this event is also fired when you manually create an order in Admin UI or if you mark a draft order as paid i.e. the draft order progresses to become an actual order.
A checkout/update event is fired when a customer with an active checkout makes updates to their cart during checkout.
FROM SHOPIFY
When a customer reaches the payment method page of the checkout, their cart is checked against your store's inventory levels. If the inventory is available, then it is held for the customer while they complete the payment. If the inventory has become unavailable, then an error message appears. If a payment fails, then the hold is released until the customer reaches the payment method page again.
COUPON
- Apply coupon at Checkout (not at Cart!!)
- at Cart level, you know only the Savings (from sale prices)
- therefore Savings and Coupon discounts are 2 different things
Shopify CART attributes
https://shopify.dev/api/liquid/objects/cart +API: https://shopify.dev/api/admin-rest/2022-01/resources/checkout#resource_object + https://shopify.dev/custom-storefronts/cart:
Considerations
- The cart is subject to the same throttling restrictions as the Storefront API.
- The cart supports a maximum of 500 line items.
- A shop or customer can create an unlimited number of carts.
- Unused and abandoned carts are auto-expired 10 days after creation by Shopify.
- Shopify automatically deletes the cart when the customer completes their checkout.
When a cart is created an id is assigned to it and it has an expiration which is set in cookie with name "cart" this token is also delivered in webhook post callbacks as id and cart_token in carts_update and checkout event.
Shopify CHECKOUT attributes
https://shopify.dev/api/liquid/objects/checkout + API: https://shopify.dev/api/admin-rest/2022-01/resources/order#top
checkout.order Returns the order created by the checkout. Depending on the payment provider, the order might not have been created yet on the checkout order status page and this property could be nil.
Complete the checkout
After you've finished creating and performing any updates to the checkout, you can complete the checkout. There are several ways to complete a checkout:
- Use the webUrl field to redirect the customer to Shopify's web checkout form.
- Complete the checkout using one of the following methods:
* Shopify card vault * Stripe * Spreedly
Shopify ORDER attributes
https://shopify.dev/api/liquid/objects/order
Abandoned Carts vs. Abandoned Checkouts
https://keepshoppers.com/blog/the-difference-between-abandoned-carts-and-abandoned-checkouts
Egyeb
This may be a simple question but I find the documentation quite confusing.
The REST API document shows the following entities: Abandoned checkouts, Order, Transaction
The webhook API document shows the following entities: Cart, Checkout, Order, OrderTransaction
What is the relationship between all these entities? And what is the overall flow.
Is like this: Cart => Checkout => Order => Transaction?
Why is the terminology different for both APIs?
For example:
Is a checkout always abandoned?
Is a transaction the same as an order transaction?
Why can't I retrieve Carts with the REST api?
Can I expect the same fields in both the REST and the webhook API?
For a given webhook entity, can I expect the same fields for the various topics (e.g checkouts/create and checkouts/delete)
What causes a checkout to be deleted?
Do carts ever get deleted?
This is all very confusing...