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
Rishabh-Webkul last edited by
Hope you are doing well can you please provide us with some screenshots regarding your issue.
Thanks & Regards!
@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.
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 last edited by
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.
@ashish2409 This SQL query return orders where cart_id is not null, but cart with given id doesn't exists in carts table