Jump to content

Cleaning orders / order file


Recommended Posts

Hi,

probably this will help you. (ps1.4.6.2)

(I found this suggestion somewhere on this forum and it works for me fine)

 

To be able to delete Orders and Carts from Backoffice modify AdminOrders.php

add: $this->delete = true;

i.e. in ...\admin\tabs\AdminOrders.php

 

class AdminOrders extends AdminTab
{
 public function __construct()
 {
global $cookie;
$this->table = 'order';
$this->className = 'Order';
$this->view = true;
$this->colorOnBackground = true;
/* add this line */
$this->delete = true;

 

then when go to your orders, you will see the trashcan - now can be deleted

when you delete order(s) you will see trashcan in matching cart(s)

(Back Office > Customers > Shopping Carts) then you can delete carts

 

Deleting order cleans all the data from database structure which were connected with deleted order. (tables: order, order_detail, order_history, order_discount, order_return_detail, order_return, order_slip_detail, order_slip, cart, cart_discount, cart_product)

 

;)

bru

  • Like 1
Link to comment
Share on other sites

Thanks so much, surely this should be a setting in the preferences, I had created loads of test orders during the build of the site and needed to clean them out before going live. Hopefully the PrestaShop Dev team will see this post and look at including a preference in a future release.

 

Thanks again.

 

Lee

Link to comment
Share on other sites

  • 2 weeks later...

Tnx. I made the changes and it worked.

Could delete the "test-orders" and start with a clean order-history.

 

Hi,

probably this will help you. (ps1.4.6.2)

(I found this suggestion somewhere on this forum and it works for me fine)

 

To be able to delete Orders and Carts from Backoffice modify AdminOrders.php

add: $this->delete = true;

i.e. in ...\admin\tabs\AdminOrders.php

 

class AdminOrders extends AdminTab
{
 public function __construct()
 {
global $cookie;
$this->table = 'order';
$this->className = 'Order';
$this->view = true;
$this->colorOnBackground = true;
/* add this line */
$this->delete = true;

 

then when go to your orders, you will see the trashcan - now can be deleted

when you delete order(s) you will see trashcan in matching cart(s)

(Back Office > Customers > Shopping Carts) then you can delete carts

 

Deleting order cleans all the data from database structure which were connected with deleted order. (tables: order, order_detail, order_history, order_discount, order_return_detail, order_return, order_slip_detail, order_slip, cart, cart_discount, cart_product)

 

;)

bru

Link to comment
Share on other sites

  • 8 months later...
  • 1 year later...

Tnx. I made the changes and it worked.

Could delete the "test-orders" and start with a clean order-history.

 

You say it worked for you in PS 1.5.6.2 ?

 

I can't find the AdminOrders.php in admin/tabs/

 

So how did you manage to do this?

Link to comment
Share on other sites

×
×
  • Create New...