Delete orders before 1/1/2015

  • Posts: 25
  • Thank you received: 1
9 years 2 months ago #212598

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.5.26

Hi

Orders table is going to be more than 75MB so I want to delete all orders before 1/1/2015 as I do not want them.
Manually deletion is not an option as you can understand, can you give me a way to do it through database?
I am an advanced phpMyAdmin user but novice sql user.
Any other way?
Do I have to delete any other associated data with deleted orders?

Any help would be much appreciated.

Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
9 years 2 months ago #212611

Hi,

You can use a mass action for that via the menu System>Mass actions.
You'll be able to set a filter on the order_modified or order_created fields and an action delete the elements.
If you have more than a few thousands elements to delete, you'll want to keep a limit and run it several times.

That way, it will delete not only the orders but the products in the orders, the addresses if necessary, and the history of the orders too.

The following user(s) said Thank You: nojunkgoodfood

Please Log in or Create an account to join the conversation.

  • Posts: 25
  • Thank you received: 1
9 years 2 months ago #212747

Thank you Nicolas!

I made a mass action as per the screenshot and deleted all orders under a specific order_id.
Database and backend are totally cleaned from orders less than specified id.

Just send it to see if there is anything I missed, I hope not!

Best regards

Attachments:
Last edit: 9 years 2 months ago by nojunkgoodfood.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 2 months ago #212748

Hi,

It looks perfect.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.059 seconds
Powered by Kunena Forum