Hello VM community!
I noticed, that after updating from v3.0.12, Revision 9028, the 'Used thumb url' field in product images is empty.
Can anyone confirm this behavior?
'Reset Thumbs' does not work, either, just giving a notice with content:
1
Tried it on several webservers - always the same.
I'm looking forward to your response!
Kind regards,
Gerald
correct .. as there is the possibility of multiple thumbs the 'Used thumb url' field is no longer filled
and is emptied if you Reset Thumbs
http://docs.virtuemart.net/tutorials/templating-layouts/222-different-thumbnail-sizes.html
thumb can normally be returned with I think $product->images[0]->FileUrlThumb();
Hi!
Thank you very much for that information.
Wow - great feature!
Good job VM team! 8)
Best regards,
Gerald
the laugh is that Max reckons it has always "been there".. just that it was never really doc'd or might have needed polishing...
::)
Was just shocked, why $product->images[0]->file_url_thumb
suddenly did not work anymore ;)
yes.. there's been quite a bit of template and extension rewriting in some cases.. was very popular in cart mods etc
Hello.
I have lost all thumbs. Haw can i return it. All thumbs field a clearn:
http://www.papa-zoo.ru/katalog/koshki
Quote from: GJC Web Design on November 16, 2015, 22:52:45 PM
correct .. as there is the possibility of multiple thumbs the 'Used thumb url' field is no longer filled
and is emptied if you Reset Thumbs
http://docs.virtuemart.net/tutorials/templating-layouts/222-different-thumbnail-sizes.html
thumb can normally be returned with I think $product->images[0]->FileUrlThumb();
thx, but im not programmer. Explain please more detail :-[
hi,
I'm not using "Enable Dynamic Thumbnail Resizing"
after upgrade vm2 to vm3.0.12 when saving an existing product the 'Used thumb url' of the first image is changed to "image_90x90.jpg"
how can I prevent this?
or do all thumbs have to be renamed in form of "image_90x90.jpg"?
Best regards, chris
$product->images[0]->file_url_thumb;
does not work <images src="<?php echo $base(road).$product->images[0]->FileUrlThumb();" />
Is it possible to then work with this $image->displayMediaThumb('u="thumb"',false,'') ?? to make such a structure in the code:
<images data-src="<?php echo $base(road).$product->images[0]->file_url_thumb;" src="<?php echo $base(road).'/images/loading.gif'" /> for scripts
what's the $base(road) bit for?
$product->images[0]->FileUrlThumb(); is a function call to the $product object and returns a url
Quote from: GJC Web Design on December 10, 2015, 10:47:34 AM
what's the $base(road) bit for?
$product->images[0]->FileUrlThumb(); is a function call to the $product object and returns a url
$base = 'www.testr.com/' - This example
$product->images[0]->FileUrlThumb(); - I understand, but why it does not work and an error that does not have access to it, how to connect properly? May need to add some code something that would function work?
depends where you use it..
could be e.g. $this->product on the details page
Quote from: GJC Web Design on December 10, 2015, 11:02:23 AM
depends where you use it..
could be e.g. $this->product on the details page
does not work
where to see a working example?
$product->images[0]->getFileUrlThumb();
$this->product->images[0]->getFileUrlThumb();
Here are examples of workers who are interested
Hello to all. These are days that I try to figure out how to fix this problem, but I just can not.
Someone could be more specific and explain step by step what you must do?
If I upgrade to 3.0.12 lose all thumbnails
Thank you all.
it depends on your template and often in things like 3rd party image zoom ext., 3rd party carts with thumbs, or additional thumbs in details etc
where they have a image url like below which simply got a databased stored url (which isn't stored now)
$thumb = $product->images[0]->file_url_thumb;
etc
you need to replace with the function
$thumb = $product->images[0]->getFileUrlThumb();
Is it possible that
$product->images[0]->getFileUrlThumb()
does not creat the thumbnail file?
I hade the case that today a customer reseted all thumbnails. And they wehre not automatically recreated. I had to insert follwing line to auto create the tumbs:
$product->images[0]->displayMediaThumb('',false);
Is this an intendet behavior or a bug?
Maybe someone turned off "Enable Dynamic Thumbnail Resizing"
No, this was also my first thought.
I took a quick look at the code of getFileUrlThumb() and displayMediaThumb(). If I've not missed somthing creatThumb() is not called anyware inside getFileUrlThumb(). So you have to use dispalyMediaThumb() to make sure any missings thumbnails will be created.
How use $images = $manufacturer->images[0]->file_url_thumb;
do not works $manufacturer->images[0]->getFileUrlThumb();
Another function is used for brands?What?
I have the same problem since I upgraded to 3.0.12.
The first thumbnail is created. The next thumbnails (in the same product) are not created in the resized folder.
What a mess...
No problem creating additional thumbs here, except that they don't display correctly on the product images page until the product is closed & saved. They appear in the resized folder OK.
for the backward compatibility of extensions which do not use virtuemart functions, but rely on virtuemart objects such as the media object, i would suggest to modify:
\administrator\components\com_virtuemart\models\media.php
update whole function to this:
public function attachImages($objects,$type,$mime='',$limit=0){
if(!empty($objects)){
if(!is_array($objects)) $objects = array($objects);
foreach($objects as $k => $object){
if(!is_object($object)){
$object = $this->createVoidMedia($type,$mime);
}
if(empty($object->virtuemart_media_id)) $virtuemart_media_id = null; else $virtuemart_media_id = $object->virtuemart_media_id;
$object->images = $this->createMediaByIds($virtuemart_media_id,$type,$mime,$limit);
foreach ($object->images as &$image)
{
if (empty($image->file_url_thumb)) {
$image->file_url_thumb = $image->getFileUrlThumb();
}
}
//This should not be used in fact. It is for legacy reasons there.
if(isset($object->images[0]->file_url_thumb)){
$object->file_url_thumb = $object->images[0]->file_url_thumb;
$object->file_url = $object->images[0]->file_url;
}
}
}
}
the main reason is that some extensions still rely on this variable:
$YagImage->urlThumb = JUri::base() . $vmImage->file_url_thumb;
yagendoo template's
\plugins\system\yagendoo_system_plugin\src\framework_v1\ecm\libs\yag_helper\helper.image_mapper.php
and many others.
so instead of forcing to use a VM function it would be nice if VM would include this variable in a way that would be backward compatible.
best regards, stan, rupostel.com
Quote from: Doomas on January 14, 2016, 17:17:19 PM
So you have to use dispalyMediaThumb() to make sure any missings thumbnails will be created.
The intended way to use the vm media system. It was always wrong, that people used the file_url_thumb. The file_url_thumb is dynamic and can be different by size. The functions
displayMediaFull() and
displayMediaThumb() are the intended functions since vm2.0.0
@stAn99. you saved my day, thanks.
I changed this code here:
// Output: Product Image
if ($product->images && $show['show_product_image'] == 'yes') {
$html.= '<div class="product-thumbnail">';
$html.= '<a href="'.$productLink.'" title="'.$product->product_name.'">';
$html.= '<img src="'.JRoute::_($product->images[0]->file_url_thumb).'" itemprop="image" class="product-image" title="'.$product->product_name.'" alt="'.$product->product_name.'" />';
$html.= '</a>';
$html.= '</div>';
}
to this but nothing changed.... What am i doing wrong?
// Output: Product Image
if ($product->images && $show['show_product_image'] == 'yes') {
$html.= '<div class="product-thumbnail">';
$html.= '<a href="'.$productLink.'" title="'.$product->product_name.'">';
$html.= '<img src="'.JRoute::_($product->images[0]->FileUrlThumb).'" itemprop="image" class="product-image" title="'.$product->product_name.'" alt="'.$product->product_name.'" />';
$html.= '</a>';
$html.= '</div>';
}
where did u get that from?
should be
$product->images[0]->getFileUrlThumb()