Duplicate shopping carts
Posted: 15 Dec 2020, 12:23
I ran into a problem when choosing a shipping method in the shopping cart: the user selects a shipping method, the page is updated and the shipping method is not selected.
Long searches led to the table "phocacart_cart_multiple" in which duplicates of user carts were accumulated. Here is one example of exporting a table:
When the user selects a delivery method or payment method, instead of changing the data in the row, a new row is created in the "phocacart_cart_multiple" table. I REPAIRed and OPTIMIZEed the table - for new carts everything was OK, but for those who had duplicates, everything remained the same: every time you choose a delivery method or payment, a duplicate of the record in the table appeared.
As far as i understand, there was some kind of failure on the server or in mysql.
Is there any way to make an automatic check for duplicate records and automatically delete duplicates if they appear?
Thank you!
Long searches led to the table "phocacart_cart_multiple" in which duplicates of user carts were accumulated. Here is one example of exporting a table:
Code: Select all
INSERT INTO `k3zls9_phocacart_cart_multiple` (`user_id`, `vendor_id`, `ticket_id`, `unit_id`, `section_id`, `loyalty_card_number`, `cart`, `shipping`, `coupon`, `payment`, `reward`, `type`, `date`) VALUES
(8975, 0, 0, 0, 0, '', 'a:1:{s:7:\"13003::\";a:2:{s:5:\"catid\";i:21;s:8:\"quantity\";i:1;}}', 0, 0, 0, 0, 0, '2020-12-05 09:10:49'),
(8975, 0, 0, 0, 0, '', 'a:1:{s:7:\"13003::\";a:2:{s:5:\"catid\";i:21;s:8:\"quantity\";i:1;}}', 0, 0, 0, 0, 0, '2020-12-05 09:10:59'),
(8975, 0, 0, 0, 0, '', 'a:1:{s:7:\"13003::\";a:2:{s:5:\"catid\";i:21;s:8:\"quantity\";i:1;}}', 0, 0, 0, 0, 0, '2020-12-05 09:11:08');
As far as i understand, there was some kind of failure on the server or in mysql.
Is there any way to make an automatic check for duplicate records and automatically delete duplicates if they appear?
Thank you!