Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    How to add the item to user cart

    General Discussion
    3
    8
    640
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      samparker last edited by

      Hi,
      I am trying to add the item to the cart and using Cart::addProduct method but everytime we execute a new cart instance is created. How can we fix it? Should we manually set the cart to session after adding to cart?
      Thanks and regards

      1 Reply Last reply Reply Quote 0
      • A
        Amitk-Webkul last edited by

        Hi there,

        Which version of Bagisto are you using?

        1 Reply Last reply Reply Quote 0
        • S
          samparker last edited by

          bagisto version is 1.4.5

          1 Reply Last reply Reply Quote 0
          • ashish2409
            ashish2409 last edited by

            @samparker what you can do is that you can only show addProduct function.
            or for a better understanding of your query can you please share screenshot for the same.

            1 Reply Last reply Reply Quote 0
            • S
              samparker last edited by samparker

              Hello @ashish2409 the addProductFunction is actually a function from bagisto core defined in the Cart class at \Webkul\Checkout\Cart::addProduct

              1 Reply Last reply Reply Quote 0
              • A
                Amitk-Webkul last edited by

                Hi @samparker,

                We did not face that kind of issue in Bagisto Core.

                Something went wrong at your end. please elaborate to find the exact issue.

                1 Reply Last reply Reply Quote 0
                • S
                  samparker last edited by

                  I got the issue. The route had a typo in the middleware.

                  1 Reply Last reply Reply Quote 0
                  • A
                    Amitk-Webkul last edited by

                    Hi @samparker,

                    If you still facing the issue please let me know.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post