Bagisto Forum

    Bagisto

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

    Disappearing carts

    Bug Report
    3
    5
    345
    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.
    • michal.webixa
      michal.webixa last edited by

      Hello,
      I have noticed that in some cases order in orders table (it feels random, so I don’t know exactly, when it happens) has value in cart_id column, but there is no data in carts table for this id.

      Bagisto version: v1.5.1
      PHP version: 8.2.12
      DB version: 10.11.4-MariaDB-1~deb12u1

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

        Hello @michal-webixa

        Hope you are doing well can you please provide us with some screenshots regarding your issue.

        Thanks & Regards!

        michal.webixa 1 Reply Last reply Reply Quote 0
        • michal.webixa
          michal.webixa @Rishabh-Webkul last edited by

          @Rishabh-Webkul So I have noticed some time ago issue, that the carts sometimes are missing. What I mean by that is that we have an existing order in the database with a value for example 801, but if we look for a row with id 801 in the carts table, there is nothing. So I wrote this query in my client's database and here is the result I have 15 orders with no existing cart.

          Screenshot 2024-01-18 at 15.16.17.png

          Here is the query:

          SELECT o.id, o.cart_id FROM orders o LEFT JOIN cart c ON c.id = o.cart_id WHERE c.id IS NULL AND o.cart_id IS NOT NULL;
          
          ashish2409 1 Reply Last reply Reply Quote 0
          • ashish2409
            ashish2409 @michal.webixa last edited by

            @michal-webixa

            As per checking the concern in the screenshot, there we can see some SQL Query are execute, Can you please let us know why these queries are executed?
            May I know what exactly you want to excecute, so that we could help you better.

            Thanks

            michal.webixa 1 Reply Last reply Reply Quote 0
            • michal.webixa
              michal.webixa @ashish2409 last edited by

              @ashish2409 This SQL query return orders where cart_id is not null, but cart with given id doesn't exists in carts table

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