daffodil
daffodil copied to clipboard
[FEAT] Add support for Shopify Storefront API Cart Driver
:bulb: Feature request
Feature Name
Shopify Cart Driver
The Desired Behavior
We'd implement the @daffodi/cart
driver interface via the storefront API;.
We already have a Shopify product driver, so hopefully this could be fairly easily implemented in Demo.
Your Use Case
As a developer using Shopify, I'd like to be able to manage a customer's cart.
@griest024
The Shopify Storefront API does not have an explicit cart object. Instead, most of the cart fields are contained somewhere within the checkout object so its necessary to obtain the checkout ID. I recommend providing a method to that effect on the checkout service to prevent duplication of logic.
In my implementation I will assume that the checkout ID can be fetched through the checkout service.
@griest024
@lderrickable and I spent some time reviewing this last week. A checkout
object in shopify is fundamentally equivalent to a DaffCart
. They support very similar functionalities. (Updating billing, updating payment, etc.)
@damienwebdev Do you want me to implement getting the checkout ID (via lastIncompleteCheckout
) in the cart driver?
@griest024 I'd imagine that "getCheckoutId" is essentially the same as createCart
in cart.
@damienwebdev I think I was misinterpreting the responsibility of the checkout
module. In the cart driver I will implement all necessary functionality to ensure that the the shopify checkout object is good to go.