VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: mano8020 on December 19, 2011, 15:37:35 PM

Title: Problem: Multiple product images in product list, front end, not showing
Post by: mano8020 on December 19, 2011, 15:37:35 PM
Hello,

I am using Joomla 1.7.3 and VM 2.0.0 RC3.
I just upgraded from VM 1.9.8 RC2 M.

We want to show 2 images for every product on the front end.
So I edited "components/com_virtuemart/views/category/tmpl/default.php".

It worked fine in the previous version, but now I only get the first image (images[0]->file_url_thumb),
the second is empty (images[1]->file_url_thumb).

What changed?
How can I get all the images for a product?




Title: Re: Problem: Multiple product images in product list, front end, not showing
Post by: mano8020 on December 22, 2011, 11:26:30 AM
I used "Reset all tables and do a fresh install" and replaced all the files with the files from the version 2.0.0. installer.
But still images[1]->file_url_thumb is empty where images[0]->file_url_thumb returns the proper url.

Please help, Anyone?????
Title: Re: Problem: Multiple product images in product list, front end, not showing
Post by: Studio 42 on December 23, 2011, 10:49:30 AM
in view.html.php line 129
YOu can set
    $productModel->addImages($products,1);

1 is the number of images

    $productModel->addImages($products,2);

give you the first 2 images

for unlimited images

    $productModel->addImages($products);
Title: Re: Problem: Multiple product images in product list, front end, not showing
Post by: mano8020 on December 23, 2011, 14:57:38 PM
Thanx a million!!
Works like a charm!