You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 20, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 20, 2023. It is now read-only.
react-graphql-client: Error message when adding product to cart #109
Currently, there's an error message when adding a product to the cart: App.js:136 Uncaught ReferenceError: client is not defined
To fix this issue, in the addVariantToCart function within App.js, add the following: const client = this.props.client;
and change each this.props.client to client.
but i want to add another product in the same cart by using cart id
i can see using checkout craete we can use checkoutLineItemsReplace to remove the existing lineitem and replace with new lineitem
as like is possible in cart?
Activity
ryangrunest commentedon Feb 7, 2020
I've made the changes on a local branch, but I don't have rights to push branches up for this repository.
swalkinshaw commentedon Feb 7, 2020
@ryangrunest you can fork the repo and then do a PR from there
ryangrunest commentedon Feb 7, 2020
Pull Request: #110
ryangrunest commentedon Feb 7, 2020
To test this issue, I connected to my storefront within src/index.js, and attempted adding a product to the cart.
Solves Shopify#109 client variable-reference
mahaboobkhan29 commentedon Jan 11, 2022
@swalkinshaw
how can i update the existing cart lineitem i can find shopify doc to increase the quantity of product that already in cart
Ref: https://shopify.dev/custom-storefronts/cart#increase-an-items-quantity
but i want to add another product in the same cart by using cart id
i can see using checkout craete we can use checkoutLineItemsReplace to remove the existing lineitem and replace with new lineitem
as like is possible in cart?
Pls reply