Results 1 to 3 of 3

Thread: regenerating thumbnails in a multi shop in prestashop

Hybrid View

  1. #1
    Join Date
    Mar 2012

    regenerating thumbnails in a multi shop in prestashop

    HI there!

    I have a multishop (2 shops), and the watermark module version 0.6 installed.

    Once I have uploaded a new watermark image using that module, I go to “Preferences” → “Images” → “Regenerate thumbnails” to regenerate the thumbnails for a specific shop. In “Multishop configuration for” I have selected the shop which I want to change the thumbnails.

    The problem is that “Regenerate thumbnails” is regenerating the thumbnails for the two shops. I only want it to regenerate the thumbnails for the selected shop.

    Any ideas to fix this?

    Thanks a lot!

  2. #2
    Join Date
    Oct 2014

    I just registered and this will be my first post for trying to help someone.

    I searched a lot and only found 1 question to this issue - your question. I need this solution for different reason, but it might help you (maybe with modifications)
    Its been almost a month since you posted it, but answer could still be usefull for you or others with this issue.
    File: classes/ImageManager.php
    PHP Code:
           $temp_str substr($src_filestrrpos($src_file'/')+1);
    $image_id substr($temp_str0strrpos($temp_str'.'));

    $image_shop_id Db::getInstance()->executeS('
            SELECT p.`id_shop_default`
            FROM `'
    ._DB_PREFIX_.'image` i
            LEFT JOIN `'
    ._DB_PREFIX_.'product` p
            ON i.`id_product` = p.`id_product`
            WHERE i.`id_image` = '

    // If image is a PNG and the output is PNG, fill with transparency. Else fill with white background.
    if ($file_type == 'png' && $type == IMAGETYPE_PNG)
                if (
    $image_shop_id[0]['id_shop_default'] != 1)
    $transparent imagecolorallocatealpha($dest_image312623127);
    $transparent imagecolorallocatealpha($dest_image255255255127);
                if (
    $image_shop_id[0]['id_shop_default'] != 1)
    $white imagecolorallocate($dest_image312623);
    $white imagecolorallocate($dest_image255255255);
    imagefilledrectangle ($dest_image00$dst_width$dst_height$white);
    My code generates different backgrounds for images from different shops. But like i said, you should be able to modify code to get results for your issue.

    I hope I helped someone.

    Best regards, Minis

  3. #3
    Join Date
    Oct 2015
    Thanks Minis,

    I have 5 shops and I want all different watermarks!
    Can you tell me how to do?
    Can you send the full ImageManager.php so I can understand where to place.

    Hopley you can solve this

    Regards Jan

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center