Jump to content

Juanmaria

Members
  • Posts

    27
  • Joined

  • Last visited

Profile Information

  • Location
    Malaga, Spain
  • Activity
    Developer

Recent Profile Visitors

2,807,673 profile views

Juanmaria's Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. Hi, As far as I know there's nothing new about this. Greetings from Spain. Juan María.
  2. Hi Baso, Have you tried giving more memory/resources to your PHP module?. It sounds like the graphic module crashes when trying to manipulate big images, you could also look into the PHP/Apache logs for some clues about those crashes. Greetings from Spain. Juan María.
  3. Hi Baso, I haven't worked with PS in the latest months, gladly my customer's installations are quite stable, and I'm starting to forget the little I knew about PS working innards. As much as I remember, the original function processed or all products or only the ones which were marked as pending. I think there wasn't a function which processed a single product, so this is not a trivial problem. If I had to do it I would locate the function which selects the pending products and copy it to a new function with a single-product select and call this one instead of the original one, but for this you might have to write an override much more complex than the one I wrote. I'm sorry for not being of more help, I wish you luck and, if you succeed, don't forget sharing your solution with us!. Greetings from Spain. Juan María.
  4. Thank you for your feedback!, I'm glad that it worked for you, I'm also glad by knowing that it also works for PS 1.6! Greetings from Spain. Juan María.
  5. Nope, the function we're calling is: protected function _regenerateThumbnails($type = 'all', $deleteOldImages = false), it has only two parameters, $type and $deleteOldImages so you cannot pass more than two parameters. To do what you want you should take the original _regenerateThumbnails function, copy it with another name and change in this line the format parameter: if (($return = $this->_regenerateNewImages($proc['dir'], $formats, ($proc['type'] == 'products' ? true : false))) === true) Good luck!
  6. Certainly, you can use the PHP mail() function and send whatevet you want. You simply add this to the script after the last line. Look at http://php.net/manual/en/function.mail.php for more information.
  7. Hi, I'm sorry but I'm, by no means, a PrestaShop expert, maybe you could get some help by opening an specific topic for this other matter. Good luck!
  8. Hi, Got it woking! This code probably would need a little cleansing but is working fine, I've copied the original script as thumbnailscron_cli.php and I've made a few canges on it. You can use it as: php thumbnailscron_cli.php my_admin_directory my_token And this is the code: // Addition to the original script if ($argc != 3) die('Usage: php thumbnailscron_cli.php my_admin_directory my_token'); $myDir=$argv[1]; $myToken=$argv[2]; if (!chdir($myDir)) die($myDir . ' is not a valid directory!'); // end of addition define('_PS_ADMIN_DIR_', getcwd()); include(dirname(__FILE__).'/../config/config.inc.php'); Context::getContext()->shop->setContext(Shop::CONTEXT_ALL); // if (substr(_COOKIE_KEY_, 34, 8) != Tools::getValue('token')) // This line is voided!!! if (substr(_COOKIE_KEY_, 34, 8) != $myToken) // We've got the token from the command line die ("bad token"); ini_set('max_execution_time', 7200); $ic = new AdminImagesController; $ic->regenerateThumbnails(); Also you can notice that there is a max_execution_time setting in the original code that can be changed to suit your needs. Hope it helps. Greetings from Spain. Juan María.
  9. True didn't remember that, but, since you has control over you server, cannot you change this configuration in your php.ini file?. Ayway, for curiosity's sake, I'm going to make a little testing for direct invocacion. I'll post my findings in a few minutes.
  10. Hi, Actually, you aren't doing it, what I told you and IMHO is the safer approach was using wget, whis way you could simply do it with a line like this: wget http://www.mydomain.com/manager/thumbnailscron.php?token=mytokenIn
  11. Hi, I haven't tried it but on this case I think that the safer approach would be calling the URL via wget that, in fact, is what I'm doing in my server whith a cron task. Greetings fron Spain. Juan María.
  12. Hi, There was already a report at: http://forge.prestashop.com/browse/PSCFV-3389?jql=text%20~%20%22catalog%20price%20rules%22 I've posted there a link to this thread. Thank you.
  13. Hi, When working on a multi-shop environment all the existent catalog price rules appear on the backoffice list notwhistanding the operator permissions or the shop selected, so one operator with permissions only for shop "A" can see, change and delete rules for shops "B", "C", etc. This problem has bugged me a lot and I've made this little code to fix it. In override/controllers/admin/AdminSpecificPriceRuleController.php I add this function: public function init() { parent::init(); if (Shop::getContext() == Shop::CONTEXT_SHOP) { // Hay seleccionada una tienda $this->_where = 'AND s.id_shop = ' .(int)$this->context->shop->id; } } And that's all. Dont forget to delete cache/class_index.php before testing it if you're using 1.5.6.0 or so. Hope it helps somebody. Greetings from Spain. Juan María.
  14. Hi, I'm not sure it this is a bug or a feature The question is that when I create a catalog price rule for a category "A" which also has child categories "A1" and "A2" this rule doesn't apply to the products under "A1" nor "A2" categories although they belong to the category "A" by inheritance. Is there any way of doing this?. I'm working on a shop with hundreds of categories and subcategories and defining rules on the lastest levels would be hell. Greetings from Spain. Juan María.
  15. I think not, I understand that the call I'm making in this function is the same that the backoffice makes when you click the regenerate option.
×
×
  • Create New...