Jump to content

[SOLVED] How do i delete customer carts


Recommended Posts

The cart or the order?

I know in AdminOrders.php I changed the following section:

        $this->table = 'order';
        $this->className = 'Order';
        $this->view = 'noActionColumn';
       $this->colorOnBackground = true;
        $this->_select = '



to this adding in the delete line.

        $this->table = 'order';
        $this->className = 'Order';
        $this->view = 'noActionColumn';
       $this->colorOnBackground = true;
       $this->delete = true; 
        $this->_select = '



There's a similar section in AdminCarts.php that you might be able to change the line for deletes from false to true.

        $this->table = 'cart';
        $this->className = 'Cart';
       $this->lang = false;
        $this->edit = false;
        $this->view = true;
        $this->delete = false;



However neither option actually deletes it from your database just your screen. I had to manually go into my database to delete the test orders we did when training our customers (we have a very small group using the site, not computer literate so we did a training session) so they did not show up for my customers as valid orders.

Link to comment
Share on other sites

Hi Ciscowrig,
many thanks for your reply, i will attempt it this evening, it's the actual customer carts (the ones that have not been completed / checked out) that i am trying to get rid of

Ragards again
Frenzy

Link to comment
Share on other sites

Unfortunately bigstef it's not standard for the "delete" option to appear.



Frenzy - I realized this might be a good thing to use myself so tried it. Changing the delete value from false to true, does in fact bring up the delete option and deleted the items from the admin side. I have not verified through phpmyadmin that the actual database was changed.

You will be able to make multiple selections through checkboxes to delete your spammers carts.

20997_LlVBm3loOaSn6rvDmRhL_t

20999_YBNFDgZ2IahsfoJ13Gi6_t

Link to comment
Share on other sites

I have added an extra bit of code to my file to enable delete of the carts.

In AdminCarts.php located in Admin/Tabs change the function construct to look like this


please make sure you back up any file you are going to change.

Hope this does it for you.

class AdminCarts extends AdminTab
{
   public function __construct()
   {
        $this->table = 'cart';
        $this->className = 'Cart';
       $this->lang = false;
        $this->edit = false;
        $this->view = true;
        $this->delete = true;



EDIT: Updated to look better

Link to comment
Share on other sites

  • 2 months later...
  • 7 months later...
  • 3 months later...
  • 9 months later...
×
×
  • Create New...