I have a problem with the original (VM3/4) bootstrap 3 template for product listing.
By default, each item displays only one thumbnail in the product list.
I wanted to add an extra image one and it doesn't work for me. How to solve it?
in /com_virtuemart/sublayouts/bs3-products.php
This displays first thumbnail:
$product->images[0]->displayMediaThumb();
or
$product->images[0]->getFileUrlThumb()
This record should display the second thumbnail:
$product->images[1]->displayMediaThumb();
or
$product->images[1]->getFileUrlThumb();
Unfortunately, an error message appears for the second image
Call to a member function getFileUrlThumb() on null
How do I display it now?
you need to also add in the config
prodimg_browse=2
administrator\components\com_virtuemart\virtuemart.cfg
save the file then the config via the admin to enable
Great, thanks - it worked, but not right away. Maybe Virtuemart is not reading this file right away? I manually added this entry to the database table in #_virtuemart_configs
Quote from: hazael on May 09, 2022, 10:45:41 AM
I manually added this entry to the database table in #_virtuemart_configs
You need to click on the Save button in VirtueMart Configuration after adding the entry in virtuemart.cfg. Then it inserts it into the database.
and clear all your caches ... cat views are cached
how custom filed realated with additional images?
is mystification for others in future?
Why do you not create new issue with right name?
Problem solved. Everything works as it should. ThX All