Bagisto Forum

    Bagisto

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

    Undefined index: product_id when I Add a second item to the cart. (Custom product page)

    Modules
    3
    5
    1851
    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.
    • F
      Flow4all last edited by

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • devansh-webkul
        devansh-webkul last edited by

        Hi @Flow4all,

        It's already showing that product_id is missing. Please check whether product_id is coming or not.

        1 Reply Last reply Reply Quote 0
        • F
          Flow4all last edited by

          I know the problem, but can't fix it. Why in the world is failing on second product if the first one was okey, the page showing the product is the same. if that make sense you you, any tip or advice would be highly appreciated.

          1 Reply Last reply Reply Quote 0
          • devansh-webkul
            devansh-webkul last edited by

            @Flow4all,

            As from the code, it's not showing any problem, I suggest you to dd($product) on the second product and check whether product_id is coming or not.

            1 Reply Last reply Reply Quote 0
            • A
              aliraza last edited by

              I solved this in my case :

              Actually as per documentation it only need $id but in sub methods bagisto is using product id from request.

              Solution :
              add this in the method body of store() in Cart Controller:
              $request['product_id'] = $id;

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