Jump to content

Edit History

dtwfung

dtwfung

On 4/14/2020 at 2:54 AM, _SMIPro_ said:

I made some modifications to the original code and now it's a standalone script that you can run from the root of your PrestaShop.

I have tested the code in PrestaShop v1.7.5.2

When you run the code, you need to edit two lines.

Line 4 > Comment this line. It is an easy precaution not to leave the script in the open.

Line 32 > Your backend folder name. You need to change 'administration' to the correct name.

Now regenerateThumbnails() regenerates all the thumbnails and deletes the oldies. If you want to skip some, add a string with the type to skip. ('categories', 'manufacturers', 'suppliers', 'products' or 'stores')

Also i added a log to track the progress of the script.
 

thumbs.php 2 kB · 2 downloads

Wonderful. 

Tried but got errors,  and for product is pointing to "watermark" module. Is it compatible to watermark module ?!  Thanks in advance !

[15-Apr-2020 10:07:30 Asia/Hong_Kong] Start - products
[15-Apr-2020 10:07:30 Asia/Hong_Kong] PHP Notice:  Array to string conversion in /home/XXXXXX/public_html/prshopupd/modules/watermark/watermark.php on line 375
[15-Apr-2020 10:07:35 Asia/Hong_Kong] End - products
[15-Apr-2020 10:07:35 Asia/Hong_Kong] Errores
[15-Apr-2020 10:07:35 Asia/Hong_Kong] Array
(

[15-Apr-2020 10:07:35 Asia/Hong_Kong] Start - stores
[15-Apr-2020 10:07:35 Asia/Hong_Kong] End - stores
[15-Apr-2020 10:07:35 Asia/Hong_Kong] Errores
[15-Apr-2020 10:07:35 Asia/Hong_Kong] Array
(
)

[15-Apr-2020 10:12:29 Asia/Hong_Kong] Start - categories
[15-Apr-2020 10:12:29 Asia/Hong_Kong] End - categories
[15-Apr-2020 10:12:29 Asia/Hong_Kong] Errores
[15-Apr-2020 10:12:29 Asia/Hong_Kong] Array

dtwfung

dtwfung

On 4/14/2020 at 2:54 AM, _SMIPro_ said:

I made some modifications to the original code and now it's a standalone script that you can run from the root of your PrestaShop.

I have tested the code in PrestaShop v1.7.5.2

When you run the code, you need to edit two lines.

Line 4 > Comment this line. It is an easy precaution not to leave the script in the open.

Line 32 > Your backend folder name. You need to change 'administration' to the correct name.

Now regenerateThumbnails() regenerates all the thumbnails and deletes the oldies. If you want to skip some, add a string with the type to skip. ('categories', 'manufacturers', 'suppliers', 'products' or 'stores')

Also i added a log to track the progress of the script.
 

thumbs.php 2 kB · 2 downloads

Wonderful. 

Tried but got error pointing to "watermark" module. Is it compatible to watermark module ?!

[15-Apr-2020 10:07:30 Asia/Hong_Kong] Start - products
[15-Apr-2020 10:07:30 Asia/Hong_Kong] PHP Notice:  Array to string conversion in /home/XXXXXX/public_html/prshopupd/modules/watermark/watermark.php on line 375
[15-Apr-2020 10:07:35 Asia/Hong_Kong] End - products
[15-Apr-2020 10:07:35 Asia/Hong_Kong] Errores
[15-Apr-2020 10:07:35 Asia/Hong_Kong] Array
(

×
×
  • Create New...