Jump to content

Recommended Posts

Hello everyone !


I'm very disapointed with some prestashop issues I encounter for those tasks :


- Combination generation

- Image regeneration

- Module traduction


The fact is that on small servers offer(OVH or Gandi) the php.ini file limits the php max_execution_time to 120s.

So when we have many products the script takes to long and gives a 503 errror...


I know that module exits to avoid those issues but I think this issues are more like to be improved in the prestashop core.


I actually managed to do it with cron task for image regeneration in this post (thanks to Juanmaria) :



Here's the how to :


1. Create this file -> /override/controllers/admin/AdminImagesController.php :

class AdminImagesController extends AdminImagesControllerCore
		public function regenerateThumbnails($type = 'all', $deleteOldImages = false)
				return parent::_regenerateThumbnails($type, $deleteOldImages);

2. Create this file -> /myadminfolder/thumbnailscron.php :

if ($argc != 3) die('Usage: php thumbnailscron_cli.php my_admin_directory my_token');


if (!chdir($myDir)) die($myDir . ' is not a valid directory!'); 

define('_PS_ADMIN_DIR_', getcwd());

if (substr(_COOKIE_KEY_, 34, 8) != $myToken)	
die ("bad token");

ini_set('max_execution_time', 7200);
$ic = new AdminImagesController;

The token is the same as the one in the searchcron -> go to your BO -> preferences -> search

In french préférences -> recherche



3. Launch the php script with cron like this :

php thumbnailscron.php my_admin_directory my_token

Now if somebody knows or aimed to improve combination generation without paying for a module, it would be great to have your experience shared !


We have the same problem for module traductions either !!


There are actually 2 module to avoid it :

- for the module traduction -> http://addons.prestashop.com/fr/outils-administration-modules-prestashop/5615-traduction-simplifiee-de-prestashop.html


- for the combination -> http://addons.prestashop.com/fr/outils-administration-modules-prestashop/5052-generateur-combinaisons-declinaisons-illimites-plus-3.html


The aim of this topic is to improve that part of prestashop once at all ^^


I will post my research for those two points.


Thanks in advance for your contribution !!!


Best regards

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...