News:

Looking for documentation? Take a look on our wiki

Main Menu

Use default picture's folder

Started by nicoco59, March 31, 2017, 01:16:10 AM

Previous topic - Next topic

nicoco59

Hi,

I would like to know if it's possible to use the default folder "images/stories/virtuemart/product/" to show my product's pictures ? I tried to disable the "Enable Dynamic Thumbnail Resizing?" option and delete the "resized" folder but at last it won't show any pictures anymore.

I was actually expecting Virtuemart's system to use the default folder in case you didn't tick that option...

I want to do that because I'm getting some kind of boring bug, where sometimes, in the "featured products" part in a product page, some pictures will have the right size (255x255, the one I set in the back office) and in other pages, the size will be 125x125.

I also saw some duplicated pictures in the resized folder, they're the sames pictures but named at the end with 125x125 or 255x255.

Thanks in advance for your help,

Nico - Using Virtuemart 3.2.0 and Joomla 3.6.5

nicoco59

I found a clue, in the product page in the back office, tab "Product's image / picture", I saw the link to the "resized" picture was wrong, it looked like this :

(Default URL) images/stories/virtuemart/product/resized/boutique-kawaii-en-ligne-cute-shop-chezfee-com-parapluie-renard-herisson-foret-mori-girl_256x255.jpg

After deleting the (Default URL) part, it seems to work, but it means I have to delete this part in every products we have on the site o____O

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

nicoco59

#3
Hi Milbo,

Thanks for your answer,

Seems we found another way to solve this problem : while editing a product, we ;

- click on the custom field tab,
- then just "delete" one "related category" / "related product" we don't want anymore,
- save the modifications,

And all the pictures which sizes were 125x125 are now at 256x255. Do you think it's a bug ?

I actually checked the link you sent me before and try editing the file but without results, I must have fail somewhere...will try tomorrow after work :)

Milbo

Please read what I posted, okey, I paste it,...

https://docs.virtuemart.net/tutorials/templating-layouts/222-different-thumbnail-sizes.html

QuoteI was actually expecting Virtuemart's system to use the default folder in case you didn't tick that option...
QuoteAssuming "Enable Dynamic Thumbnail Resizing" is configured in VM, if a thumbnail image does not exist for the size specified in "Thumbnail Image Width" and "Thumbnail Image Height", it is created.

This results in one thumbnail being created for the size specified e.g. coat_0x200.jpg

So when you disable your thumbnail generation, where will VM look for the image? ahh the SAME PATH! It will look also for coat_0x200.jpg. Why it should suddenly use the original image?
Quote
"Enable Dynamic Thumbnail Resizing?"
Does it say "do not use thumbnails?" no, it does not say that. The option is there for Profis, which sell for example art and they often finetune any thumbnail manually. any other people should just tick the option and not care about.

Quote
Virtuemart allows more than one product "thumbnail" in the product image resized folder, and will create thumbnails (in addition to the VM configuration settings) through use of template overrides.

To have a template view create a thumbnail that is different from the configuration settings and use this thumbnail, a simple override to the layout is required that adjusts the function "displayMediaThumb".

So check your template, your layouts and look for the function displayMediaThumb, when your layout is not using this function => your shop has no vm behaviour. When you dont want to use the thumbs, use the function for the full image "displayMediaFull"
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

Quote from: nicoco59 on April 05, 2017, 01:19:11 AM
Seems we found another way to solve this problem : while editing a product, we ;

- click on the custom field tab,
- then just "delete" one "related category" / "related product" we don't want anymore,
- save the modifications,

And all the pictures which sizes were 125x125 are now at 256x255. Do you think it's a bug ?

From my viewpoint not really a solution. Please read the link above to understand how VM creates different sizes. Restoring of the product is not necessary.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

nicoco59

Quote from: Milbo on April 05, 2017, 09:57:11 AM
Quote from: nicoco59 on April 05, 2017, 01:19:11 AM
Seems we found another way to solve this problem : while editing a product, we ;

- click on the custom field tab,
- then just "delete" one "related category" / "related product" we don't want anymore,
- save the modifications,

And all the pictures which sizes were 125x125 are now at 256x255. Do you think it's a bug ?

From my viewpoint not really a solution. Please read the link above to understand how VM creates different sizes. Restoring of the product is not necessary.

I'll take a look and give you feebacks, thanks.

wheat

QuoteSo check your template, your layouts and look for the function displayMediaThumb, when your layout is not using this function => your shop has no vm behaviour. When you dont want to use the thumbs, use the function for the full image "displayMediaFull"

It wasn't specified or mentioned if it mattered which part of the VM -> Configuration -> Templates & Layout, so I went ahead and changed all of them,
>> Cart layout, Category Layout, Sublayouts for products in category, Product layout

I have no idea where to find a function called displayMediaFull.   I'm under the impression that functions may be listed under the VM -> Extension -> Modules, but I'm not seeing any evidence. So, I suppose that is a bad guess.  Googling doesn't come up with anything except modifying code.

Please advise.