I want to show the 3 image in the category view.
In the category template (category/default) i changed the number$product->image[0] from 0 to 2 in this line
But nothing changes.It still showing the first image
// Show Products
?>
<div class="product floatleft<?php echo $Browsecellwidth . $show_vertical_separator ?>">
<div class="spacer" style="min-height:auto;">
<div class="width90 floatleft center">
<a title="<?php echo $product->link ?>" rel="vm-additional-images" href="<?php echo $product->link; ?>">
<?php
echo $product->images[0]->displayMediaThumb('class="browseProductImage"', true);
?>
How can this be done?
first in config set the number of images
administrator\components\com_virtuemart\virtuemart.cfg
prodimg_browse=3
then the images are available in your template as
echo $product->images[0]->displayMediaThumb('class="browseProductImage"', false);
echo $product->images[1]->displayMediaThumb('class="browseProductImage"', false);
echo $product->images[2]->displayMediaThumb('class="browseProductImage"', false);
Thanks for your reply.
I follow the instuctions but in the virtuemart.cfg was no prodimg_browse.
So i addid it in the shopfront part.
after i changed echo $product->images[1]->displayMediaThumb('class="browseProductImage"', false);
nothing changed stil using the first image
i emptied the caches.
I am uising VM VirtueMart 3.8.8 10472 Joomla! 3.9.28 Stable [ Amani ] 6-July-2021 15:00 GMT
I guess you are using overrides in the templates directory.
Jörgen
Yes, indeed.
We need it because it only in 1 category where need to show the 3e image.
Then You have to modify your override file.
Jörgen
I have copied and renamed the default.php and saved it to the joomla override folder; /tempalte/html/.................
After in made also several other changes these changes are showed but the "image[1]" is still not working.
Gives error Call to a member function displayMediaThumb() on null
Only when the first image[0] is showed the page is working
QuoteI follow the instuctions but in the virtuemart.cfg was no prodimg_browse.
So i addid it in the shopfront part.
what does this mean?
have you now saved your VM config in the admin?
If you change as explained by GJC Web Design
administrator\components\com_virtuemart\virtuemart.cfg
prodimg_browse=3
You need to go in admin>virtuemart>config and save it, to be sure this parameter is update