Post by HAO » Fri Feb 24, 2017 10:18 am

My shop has a lot of orders from the beginning to the present, For orders that have been completed for more than 3 months, We intend to delete some old orders.

Is there a module that allows us to specify a date section, Remove the order that has been completed?

Filter mode:
Date Start
Date End
Order Status

Filter the corresponding conditions, Bulk Order Delete.

Is there a suitable module for us to use?

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by thekrotek » Fri Feb 24, 2017 3:34 pm

I have Order Manager extension, which expands order managements like... A LOT! Yet due to some reasons it still doesn't have an option to select date range, only particular date.

But you don't need any extension for that, if your task is one time. It's much easier to delete orders right from PHPMyAdmin using MySQL query:

DELETE FROM `order` WHERE o.order_status_id IN (1,2,3) AND TO_DAYS(o.date_added) <= (TO_DAYS(NOW()) - 10)

In this example all orders 10 days old and more with statuses 1, 2 or 3 will be deleted. You, of course, can adjust this query to your needs, this is just and example.

NOTE: This is the most basic example, which will delete ONLY orders. If you want to also delete all associated info like vouchers or coupons and restock products from deleted orders, query will be more complex.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by paulfeakins » Fri Feb 24, 2017 6:26 pm

HAO wrote:
Fri Feb 24, 2017 10:18 am
We intend to delete some old orders.
Why?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by thekrotek » Fri Feb 24, 2017 6:35 pm

paulfeakins wrote:
Fri Feb 24, 2017 6:26 pm
Why?
I actually do the same for missing and unpaid orders. The answer is simple: to keep DB small and healthy.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by HAO » Sat Feb 25, 2017 1:09 pm

This is my boss's request, Because orders that are usually more than three months should not be retained after processing has been completed.

If you keep the order for a long time will only feel chaotic in the order list, So we want to try to streamline the pages of the order page, Would you understand what I mean?

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by thekrotek » Sat Feb 25, 2017 2:40 pm

Ah, so you need to periodically delete orders. Then Auto Delete Orders extension is just for you! Does exactly what you need: automatically deletes orders with selected statuses in given period of time.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by HAO » Sun Feb 26, 2017 1:35 am

I personally think that the Auto Delete Orders for this feature, I feel a little fear.

Because I am more accustomed to manually delete, After all, if you really delete the data should not be deleted, At least you know how to be deleted.

But I will still tell my boss that there is such a module.

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by thekrotek » Sun Feb 26, 2017 1:41 am

It deletes everything properly: orders, order products, assigned vouchers and coupons, etc. It can even restock your products.

Basically it's the same as you do manually, but doesn't require ANY attention.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by HAO » Sun Feb 26, 2017 3:14 am

Thanks for your note. my boss would consider.

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by HAO » Sun Feb 26, 2017 2:04 pm

Excuse me, Questions about the restock.

Can order for specified conditions, when the order is deleted, Do not make any changes in the number of stocks?

Because we are selling limited products, Many products are sold without inventory, My boss does not want to cause a dispute because of the amount of product back.

Does your module be able to avoid this?

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by thekrotek » Sun Feb 26, 2017 2:56 pm

You can either restock all products or don't - there's an option in settings for this. But there, of course, no per product option.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by HAO » Sun Feb 26, 2017 8:55 pm

Thank you for your reply!

Our products are added to take the following settings:
Subtract Stock Yes *(All products)

Process the order status of the order:
Bank Transfer (Waiting for payment) Use the order status of this module
Taiwan payment gateway module #1 Processing
Taiwan payment gateway module #2 Pending

Will the order status be used for these payment modules, Whether we delete the order data will not change the number of our product stock?

If not restock, We will consider purchase your module, Because we have the physical store sales.

If we delete the order record, Make a change in the number of our products, That this is a major disaster for us.

Please forgive me that I can only express it as much as possible through Google Translate, I hope you can understand what I mean.

Thank you!

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by thekrotek » Sun Feb 26, 2017 9:08 pm

Unfortunately, no, I didn't understand you, sorry. Google translate isn't perfect.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by HAO » Sun Feb 26, 2017 9:48 pm

I try to express more clearly the expression, I am currently using these three order status payment module orders.

When I delete the specified order, will there be any changes in the number of products for these orders?

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by thekrotek » Sun Feb 26, 2017 10:02 pm

But I already answered you on this question: there's an option to enable or disable products restocking for deleted orders.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by HAO » Mon Feb 27, 2017 4:23 am

Thank you for your answer!

My boss just wants to confirm it again, I will tell him!

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by HAO » Wed Mar 01, 2017 9:49 pm

Please forgive me for asking a question again.

Home / Modules / Auto Delete Orders [Delete After] (Days passed, since order status was changed to selected one.)

Excuse me, If I want to set the order automatically after 90 days to delete, Is it directly in the above input I want the number of days?

E.g: All the orders from now on after 90 days.

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm
Who is online

Users browsing this forum: Amazon [Bot] and 68 guests