Author Topic: Virtuemart Multi image upload not adding images  (Read 618 times)


  • Beginner
  • *
  • Posts: 1
  • A beginner
Virtuemart Multi image upload not adding images
« on: July 29, 2020, 05:32:29 am »
I wanted to put this here for anyone with a similar issue, Virtuemart Multi Image Uploader doesn't save images to the product.

This is caused by a new table column called 'has_medias'.


Code: [Select]
// New query to update VM Medias table
    $query = $db->getQuery(true);
        ->set('has_medias = 1')
        ->where('virtuemart_product_id = ' . (int) $virtuemart_product_id);

    $result = $db->execute();

    if ($db->getErrorNum())
        $json['error'] = JText::sprintf('Error setting has_medias on #__virtuemart_virtuemart_products', $db->getErrorNum(), $db->getErrorMsg()).'<br />';
        return false;
    // End new Query

This is mainly just an FYI for others. The above code needs to be added. To the end of the main function with query updates. VM adds in a new has_medias column and therefor on new products the multi-added images are not shown until has_media is set to 1.



  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28022
  • Always on vacation
    • Jenkin Hill Internet
Re: Virtuemart Multi image upload not adding images
« Reply #1 on: July 29, 2020, 10:31:45 am »
The Virtuemart Multi Image Upload plugin by cmsmart has not been updated for more than a year.

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart 3.8.7 10374 on Joomla 3.9.24 PHP 7.4.12

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4408
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Virtuemart Multi image upload not adding images
« Reply #2 on: August 01, 2020, 15:30:08 pm »
Thanks for report.
The problem is that the table changes are not grouped, so if you do a plugin, you have no informations.
I have another problem to fix, now VM seems to have has_category column, but i dont know for now, the exact release about all this changes.
Same for new category child update.
If someone have all information about table changes easy to find, i thank you.
Problem is to easy check the release to know if i work with the new fields or not, because this informations are not grouped in one page with the VM version.