• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

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

How to add the item to user cart

General Discussion
3
8
712
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 8 Jun 2023, 11:02

    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 8 Jun 2023, 11:27

      Hi there,

      Which version of Bagisto are you using?

      1 Reply Last reply Reply Quote 0
      • S
        samparker last edited by 8 Jun 2023, 11:31

        bagisto version is 1.4.5

        1 Reply Last reply Reply Quote 0
        • ashish2409
          ashish2409 last edited by 9 Jun 2023, 10:39

          @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 13 Jun 2023, 08:52 13 Jun 2023, 08:52

            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 14 Jun 2023, 04:54

              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
              • 9 days later
              • S
                samparker last edited by 23 Jun 2023, 13:47

                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 27 Jun 2023, 04:42

                  Hi @samparker,

                  If you still facing the issue please let me know.

                  1 Reply Last reply Reply Quote 0
                  5 out of 8
                  • First post
                    5/8
                    Last post