Skip to content
This repository was archived by the owner on Nov 20, 2023. It is now read-only.
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

Open

Description

@ryangrunest

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.

Activity

  1. ryangrunest commented on Feb 7, 2020

    @ryangrunest
    Author

    I've made the changes on a local branch, but I don't have rights to push branches up for this repository.

  2. swalkinshaw commented on Feb 7, 2020

    @swalkinshaw
    Collaborator

    @ryangrunest you can fork the repo and then do a PR from there

  3. ryangrunest commented on Feb 7, 2020

    @ryangrunest
    Author

    Pull Request: #110

  4. ryangrunest commented on Feb 7, 2020

    @ryangrunest
    Author

    To test this issue, I connected to my storefront within src/index.js, and attempted adding a product to the cart.

  5. added a commit that references this issue on Jan 21, 2021
  6. mahaboobkhan29 commented on Jan 11, 2022

    @mahaboobkhan29

    @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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions