Author Topic: Additional image on the list of products (VM4)  (Read 275 times)

hazael

  • Jr. Member
  • **
  • Posts: 77
    • Biżuteria etniczna i orientalna
  • VirtueMart Version: 3.8.9
Additional image on the list of products (VM4)
« on: May 07, 2022, 18:10:57 pm »
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:
Code: [Select]
$product->images[0]->displayMediaThumb(); or
Code: [Select]
$product->images[0]->getFileUrlThumb()
This record should display the second thumbnail:
Code: [Select]
$product->images[1]->displayMediaThumb(); or
Code: [Select]
$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?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10416
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Additional image on the list of products (VM4)
« Reply #1 on: May 07, 2022, 22:15:43 pm »
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
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

hazael

  • Jr. Member
  • **
  • Posts: 77
    • Biżuteria etniczna i orientalna
  • VirtueMart Version: 3.8.9
Re: Additional image on the list of products (VM4)
« Reply #2 on: May 09, 2022, 10:45:41 am »
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

Jumbo!

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 806
  • Full-stack Web Developer
    • www.virtueplanet.com
  • VirtueMart Version: Always latest
Re: Additional image on the list of products (VM4)
« Reply #3 on: May 09, 2022, 16:09:00 pm »
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.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10416
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Additional image on the list of products (VM4)
« Reply #4 on: May 09, 2022, 16:45:04 pm »
and clear all your caches ...  cat views are cached
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1439
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Additional image on the list of products (VM4)
« Reply #5 on: May 10, 2022, 11:48:42 am »
how custom filed realated with additional images?

is mystification for others in future?

Why do you not create new issue with right name?
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

hazael

  • Jr. Member
  • **
  • Posts: 77
    • Biżuteria etniczna i orientalna
  • VirtueMart Version: 3.8.9
Re: Additional image on the list of products (VM4)
« Reply #6 on: May 10, 2022, 11:52:01 am »
Problem solved. Everything works as it should. ThX All