Jump to content

Abandoned Carts


Recommended Posts

Hello Susanne,

 

I looked around on this, as you got me wondering about the subject too. I found this post from 2011, but I'm not sure it will apply to your 1.5.3.1 version: "Abandoned cart - Is there anyway to delete these?"

 

 

So far, the most current solutions I've found have been paid add-ons. There are a bunch of them in the PrestaShop Addons site.

 

I am still looking and would interested in seeing another solution if you find one.

 

Regards,

 

Arnel C.

Community Support Team

www.webhostinghub.com

Link to comment
Share on other sites

For this moment I have 700 abandoned carts created by robots.

Delete one at the time will take me forever.

 

In prestashop 1.4 I addes this line" $this->delete = true;"

in admincarts.php.

then I could select multiple shopping carts at the same time to delete.

the same principle should also work 1.5,but I have no idea which file a similar change should be made or how to do.

Any suggestions are appreciated.

Susanne

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

I added the following to line 38 on AdminCartControllers.php (version 1.5.3) and it allowed me to select multiple at a time and delete them.

 $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));

  • Like 5
Link to comment
Share on other sites

  • 4 weeks later...

I added the following to line 38 on AdminCartControllers.php (version 1.5.3) and it allowed me to select multiple at a time and delete them.

 $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));

 

I just want to say this is a freaking lifesaver. Thank you very much!!

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...

I added the following to line 38 on AdminCartControllers.php (version 1.5.3) and it allowed me to select multiple at a time and delete them.

  $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));

 

Sorry for opening this again, is this located in Controllers > Admin > AdminCartRulesController.php? Also where is it inserted, you state line 38 but not sure in which part to add into. Can you help me?

 

Thanks

Liam

Link to comment
Share on other sites

I added the following to line 38 on AdminCartControllers.php (version 1.5.3) and it allowed me to select multiple at a time and delete them.

  $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));

 

Once I select them I clic "Delete selected" appears the error "An error occurred while deleting selection." and nothing is deleted.

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

Once I select them I clic "Delete selected" appears the error "An error occurred while deleting selection." and nothing is deleted.

 

I'm pretty sure you're getting this message because you are trying to delete carts that have order numbers attached to them. Try filtering those out using the filters in the header and try again.

Link to comment
Share on other sites

  • 4 weeks later...

The mass delete abandon carts should be a STANDARD feature in Prestashop. The fact that it isn't reveals a lot.  In just two days of operation, I've got 300 abandoned carts - and the search engines have not yet even found the site.

 

While I like this software, I'm belatedly discovering that it's basic functions are inadequate.

 

I'd have been happy to pay $1000 or whatever was deemed a commerical price for a fully-functioning Prestashop. That'd still been "cheap" compared to the following:

 

Instead, I have to go through the gigantic hassle of figuring out what is missing in Prestashop (by using, testing, configuring - a process that takes many weeks if not months) - then hunt around for forum solutions - and then after reading all of the comments (and misguided advice, but that's not intentional, just fair warning - read everything FIRST) - then decide if I can code the required changes myself - or go ahead and buy yet another module.

 

The actual "cost" to myself and my partner who is assisting me is now quite expensive.  Multiply this by every other frustrated Prestashop user in the world and you're talking tens of millions of dollars being wasted.

 

It is staggering that the developers got away with this sort of thing. A powerful tool - with a whole lot of "gotcha's!!!" to watch out for.

 

I'm convinced that Prestashop intentionally leaves out essential functions so that modules can be sold. There really can't be any other explanation, especially for what is obvious. The forums are chock-full of "I wish I had xxx" and the solution is either custom tweaks / programming - or go buy something.  I've done that - happy to pay it (no complaints about paying) - but the point is - I shouldn't have to "fix" the software in the first place.

 

Modifying core files is apparently going to break any possibility of an upgrade too.  I've gone ahead and done it where I can. But the whole approach to what Prestashop offers needs to be examined.  A thorough, rigourous examination of what it should do needs to be conducted. And the documentation - absolutely the worst I've seen anywhere. This is another area that desperately needs serious attention.

 

Add-on modules should do what Prestashop was never designed to do - not fill in the numerous "holes" that the developers convienently forgot to take care of.

 

I'm not a current developer - but do speak from 30+ years of programming experience as a computer systems analyst and having written many millions of lines of code "the hard way" (line by line). I do understand the software development process quite well. What I've seen with Prestashop would had simply never passed a commercial development review process.

Edited by Aardvark1971 (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Works like a charm! - However not sure what influence this would have on database / other tables, as it only seem to delete the "visible" content i BO.

 

To clarify to others:

in Controllers > Admin > AdminCartsController.php

 

Add the code:

$this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));

 

 
to an empty line (row 41 in 1.5.6.2).
Link to comment
Share on other sites

  • 3 weeks later...

The mass delete abandon carts should be a STANDARD feature in Prestashop. The fact that it isn't reveals a lot.  In just two days of operation, I've got 300 abandoned carts - and the search engines have not yet even found the site.

 

While I like this software, I'm belatedly discovering that it's basic functions are inadequate.

 

I'd have been happy to pay $1000 or whatever was deemed a commerical price for a fully-functioning Prestashop. That'd still been "cheap" compared to the following:

 

Instead, I have to go through the gigantic hassle of figuring out what is missing in Prestashop (by using, testing, configuring - a process that takes many weeks if not months) - then hunt around for forum solutions - and then after reading all of the comments (and misguided advice, but that's not intentional, just fair warning - read everything FIRST) - then decide if I can code the required changes myself - or go ahead and buy yet another module.

 

The actual "cost" to myself and my partner who is assisting me is now quite expensive.  Multiply this by every other frustrated Prestashop user in the world and you're talking tens of millions of dollars being wasted.

 

It is staggering that the developers got away with this sort of thing. A powerful tool - with a whole lot of "gotcha's!!!" to watch out for.

 

I'm convinced that Prestashop intentionally leaves out essential functions so that modules can be sold. There really can't be any other explanation, especially for what is obvious. The forums are chock-full of "I wish I had xxx" and the solution is either custom tweaks / programming - or go buy something.  I've done that - happy to pay it (no complaints about paying) - but the point is - I shouldn't have to "fix" the software in the first place.

 

Modifying core files is apparently going to break any possibility of an upgrade too.  I've gone ahead and done it where I can. But the whole approach to what Prestashop offers needs to be examined.  A thorough, rigourous examination of what it should do needs to be conducted. And the documentation - absolutely the worst I've seen anywhere. This is another area that desperately needs serious attention.

 

Add-on modules should do what Prestashop was never designed to do - not fill in the numerous "holes" that the developers convienently forgot to take care of.

 

I'm not a current developer - but do speak from 30+ years of programming experience as a computer systems analyst and having written many millions of lines of code "the hard way" (line by line). I do understand the software development process quite well. What I've seen with Prestashop would had simply never passed a commercial development review process.

 

+1

 

I have many years of experience in IT. I also think that there can be no other explanation to this lack of basic functionalities, and those broken, than to give work to a community (and force others who have no time or no competence to hire them) who in return will promote the software (once they have invested much time and energy to make their own site work, there is a market). It's a kind of trap.

To the normal time to build a site, 300% should be added to fix all that when you have enough IT knowledge (HTML CSS PHP Ajax etc.), or a lot of money. And every week something stops working that will also require to be fixed. It looks like a new business model in the open source software.

Link to comment
Share on other sites

I've deleted some some carts with this method from the BO, after modification of AdminCartsControllers.php

Then I've looked into the database for connected tables.

I've found 4 connected tables ps_cart_product, ps_cart_cart_rule, ps_cart_rule_country, ps_cart_rule_product_rule_value, which have all been adequately cleaned, so the earlier post saying that orphan entries are left in 8 tables etc. is marketing bull....

 

In conclusion, the AdminCartsControllers.php modification is enough.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...

Is deleting abandoned carts something that needs to be done if you don't get that many? I'm currently getting only 5-10 a week and have not been deleting them as I figured the data might be of some use later to figure out price or minimum order adjustments. Does keeping them impact performance?

Link to comment
Share on other sites

  • 4 months later...

Did you add it after the existing code on line 38, or inserted it on an empty row after (line 39).

 

I just added it to the empty line 39, and it works in 1.5.6.0 - but not sure if it will affect others by not adding it on line 38?

I'm trying this in PS 1.5.4.1.

 

I see this code after the modification:

 

 

class AdminCartRulesControllerCore extends AdminController

{

        public function __construct()

        {

                $this->table = 'cart_rule';

                $this->className = 'CartRule';

                $this->lang = true;

                $this->addRowAction('edit');

                $this->addRowAction('delete');

                $this->fields_list = array(

                        'id_cart_rule' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),

                        'name' => array('title' => $this->l('Name')),

                        'priority' => array('title' => $this->l('Priority')),

                        'code' => array('title' => $this->l('Code')),

                        'quantity' => array('title' => $this->l('Quantity')),

                        'date_to' => array('title' => $this->l('Until')),

                        'active' => array('title' => $this->l('Status'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false),

                );

$this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));

                parent::__construct();

        }

 

        public function setMedia()

        {

                parent::setMedia();

                $this->addJqueryPlugin(array('typewatch', 'fancybox', 'autocomplete'));

        }

 

 

But I don't see "how to" select multiple carts. I'm missing anything or is the wrong place ?

 

I've tried also including this line in other positions a few lines before, no difference.

 

Thanks !

Link to comment
Share on other sites

I'm trying this in PS 1.5.4.1.

 

I see this code after the modification:

 

 

class AdminCartRulesControllerCore extends AdminController

{

        public function __construct()

        {

                $this->table = 'cart_rule';

                $this->className = 'CartRule';

                $this->lang = true;

                $this->addRowAction('edit');

                $this->addRowAction('delete');

                $this->fields_list = array(

                        'id_cart_rule' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),

                        'name' => array('title' => $this->l('Name')),

                        'priority' => array('title' => $this->l('Priority')),

                        'code' => array('title' => $this->l('Code')),

                        'quantity' => array('title' => $this->l('Quantity')),

                        'date_to' => array('title' => $this->l('Until')),

                        'active' => array('title' => $this->l('Status'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false),

                );

$this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));

                parent::__construct();

        }

 

        public function setMedia()

        {

                parent::setMedia();

                $this->addJqueryPlugin(array('typewatch', 'fancybox', 'autocomplete'));

        }

 

 

But I don't see "how to" select multiple carts. I'm missing anything or is the wrong place ?

 

I've tried also including this line in other positions a few lines before, no difference.

 

Thanks !

Responding myself ... the right file to modify is AdminCartsController.php

Link to comment
Share on other sites

  • 5 months later...
×
×
  • Create New...