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!!!

  • anyone help me. – Lovely Setia Jul 31 '18 at 6:54
  • please check my answer and let me know if anything. – Aasim Goriya Aug 6 '18 at 6:02
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;
  • this is not working . – Lovely Setia Aug 7 '18 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))". – Lovely Setia Aug 7 '18 at 10:35
  • have you add this "SET FOREIGN_KEY_CHECKS=0;" before query? – Aasim Goriya Aug 7 '18 at 11:10
  • "SET FOREIGN_KEY_CHECKS=0;" in quote table? – Lovely Setia Aug 7 '18 at 11:25
  • 1
    have you tried to run set forign key check and truncate query together ? – Aasim Goriya Aug 9 '18 at 4:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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