Author Topic: Use default picture's folder  (Read 478 times)

nicoco59

  • Beginner
  • *
  • Posts: 26
Use default picture's folder
« on: March 31, 2017, 01:16:10 am »
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

  • Beginner
  • *
  • Posts: 26
Re: Use default picture's folder
« Reply #1 on: March 31, 2017, 01:40:27 am »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9062
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Use default picture's folder
« Reply #2 on: April 04, 2017, 01:30:02 am »
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

nicoco59

  • Beginner
  • *
  • Posts: 26
Re: Use default picture's folder
« Reply #3 on: April 05, 2017, 01:19:11 am »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9062
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Use default picture's folder
« Reply #4 on: April 05, 2017, 09:55:35 am »
Please read what I posted, okey, I paste it,...

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

Quote
I was actually expecting Virtuemart's system to use the default folder in case you didn't tick that option...
Quote
Assuming "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"
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9062
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Use default picture's folder
« Reply #5 on: April 05, 2017, 09:57: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 should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

nicoco59

  • Beginner
  • *
  • Posts: 26
Re: Use default picture's folder
« Reply #6 on: April 06, 2017, 19:44:16 pm »
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

  • Jr. Member
  • **
  • Posts: 52
    • hausofwheat
Re: Use default picture's folder
« Reply #7 on: May 12, 2017, 22:40:04 pm »
Quote
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"

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.