1

I have deleted all customers, orders from admin panel.

But I also want to delete "Reports >> Marketing >> Products in Carts, Abandoned Carts" from admin panel in "Magento 2.1".

How can I do that?

Please guide me!!!

2
  • anyone help me. Commented Jul 31, 2018 at 6:54
  • please check my answer and let me know if anything. Commented Aug 6, 2018 at 6:02

1 Answer 1

3

You cannot delete it from admin panel, You need to remove all data from quote table in database.

So go to your database and Run below SQL query in your database SQL query section.

SET FOREIGN_KEY_CHECKS=0;

TRUNCATE TABLE `quote`;
TRUNCATE TABLE `quote_address`;
TRUNCATE TABLE `quote_address_item`;
TRUNCATE TABLE `quote_id_mask`;
TRUNCATE TABLE `quote_item`;
TRUNCATE TABLE `quote_item_option`;
TRUNCATE TABLE `quote_payment`;
TRUNCATE TABLE `quote_shipping_rate`;

SET FOREIGN_KEY_CHECKS=1;
24
  • this is not working . Commented Aug 7, 2018 at 10:29
  • it show error "#1701 - Cannot truncate a table referenced in a foreign key constraint (magentodb.quote_address, CONSTRAINT QUOTE_ADDRESS_QUOTE_ID_QUOTE_ENTITY_ID FOREIGN KEY (quote_id) REFERENCES magentodb.quote (entity_id))". Commented Aug 7, 2018 at 10:35
  • have you add this "SET FOREIGN_KEY_CHECKS=0;" before query? Commented Aug 7, 2018 at 11:10
  • "SET FOREIGN_KEY_CHECKS=0;" in quote table? Commented Aug 7, 2018 at 11:25
  • 1
    have you tried to run set forign key check and truncate query together ? Commented Aug 9, 2018 at 4:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.