News:

Looking for documentation? Take a look on our wiki

Main Menu

Default Product Image Action Changed

Started by EsSa55, August 30, 2019, 13:37:28 PM

Previous topic - Next topic

EsSa55

In 3.4.2 and below, the default product image action was Upload.

In 3.6.0 it has switched to Replace.

That means unless the action is changed to upload, subsequent selected images will replace the previous one rather than add to it.

How do I change the default back to the Upload action?

See attached screenshot.

TIA


GJC Web Design

Hi Eddie..   is a "feature" ..  ;)

Think max will remove in the next release...

If u want to "hack it out" then its JS in   components/com_virtuemart/assets/js/mediahandler.js ~ line 41

   $('[name="upload"]').on ('change', function (){
      var rr = $(this).parent().find("[name='media[media_action]']:checked");
      if (typeof $(rr[0]).val() != 'undefined' && $(rr[0]).val() == 0) {
         var rs = $(this).parent().find("[id='media[media_action]upload']").attr('checked', true);
         //var rs = $(this).parent().find("[id='media[media_action]replace']").attr('checked', true);
      }
   });

so comment out

//var rs = $(this).parent().find("[id='media[media_action]replace']").attr('checked', true);
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/