VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: nicoco59 on December 18, 2016, 16:11:13 PM

Title: Bug when resizing thumbnails [created by override]
Post by: nicoco59 on December 18, 2016, 16:11:13 PM
Hi,

I'm currently redesigning my shop, and I had to increase the size of the product's thumbnails. I did this step by step :

- Disable Dynamic Resizing
- Delete pictures in the resized folder (products and categories)
- Enable Dynamic Resizing (changed values from 125x125 to 256x255)
- Refresh main page

Results : No pictures are shown, the link to the picture is actually right (it takes the new parameter "256x256" in the name) but the picture's name in the "resized" folder is wrong + it's size is wrong (125x125).

I also deleted by mistake the "resized" folder, I got a message on my site to say I had to to recreate it again, but at last it was recreated automatically o_O.

Do you have ideas to solve this bug ?..

Thanks,

Nicolas
Title: Re: Bug when resizing thumbnails
Post by: GJC Web Design on December 18, 2016, 16:49:23 PM
I have done what u describe often on VM sites and it just works

versions?

live url?

but the picture's name in the "resized" folder is wrong + it's size is wrong (125x125).

examples?
Title: Re: Bug when resizing thumbnails
Post by: nicoco59 on December 29, 2016, 18:09:09 PM
Quote from: GJC Web Design on December 18, 2016, 16:49:23 PM
I have done what u describe often on VM sites and it just works

versions?

live url?

but the picture's name in the "resized" folder is wrong + it's size is wrong (125x125).

examples?

Weird.

I'm using VirtueMart 3.0.18, I don't a live url to send you as I'm working on a local server right now.

Here's an example :

- When I'm on the homepage and check the picture's url it's : /images/stories/virtuemart/product/resized/boutique-kawaii-shop-france-chezfee-com-set-bento-boite-lunchbox-totoro-studio-ghibli-officiel-authentique_256x255.jpg

- When I check the picture's name in the folder, that picture doesn't exist, I have this instead : boutique-kawaii-shop-france-chezfee-com-set-bento-boite-lunchbox-totoro-studio-ghibli-officiel-authentique_125x125.jpg

So in the backoffice, the parameter (size of the pic) I set worked (because the path is right in the source code), but the function that change the size of those pictures doesn't.

Is there a way to disable this function ? Apart from overriding the component ? (in case no solutions can be found)
Title: Re: Bug when resizing thumbnails
Post by: nicoco59 on December 29, 2016, 18:21:21 PM
Quote from: GJC Web Design on December 18, 2016, 16:49:23 PM
I have done what u describe often on VM sites and it just works

versions?

live url?

but the picture's name in the "resized" folder is wrong + it's size is wrong (125x125).

examples?

Ok I found what's wrong, I overrided that part listing the products (using the html folder in the template), if I don't override and refresh, the right pictures are generated.

It doesn't help me that much since I overrided that part to use a custom lazy load, and I checked it's not bugging because of that script.

So or I'm not using the last version of the products.php file (which could cause maybe this), or there is really a fix to do for that.

Edit : Seems I was using this function : getFileUrlThumb but it doesn't help to create the resized picture and instead generate those 125x125 ones.