Author Topic: Default Product Image Action Changed  (Read 269 times)

EsSa55

  • Jr. Member
  • **
  • Posts: 73
    • 4FootyFans & 4MovieTVmusicFans
  • Skype Name: talk2-4footyfans
  • VirtueMart Version: Live: 3.4.2
Default Product Image Action Changed
« on: August 30, 2019, 13:37:28 pm »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9176
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: Default Product Image Action Changed
« Reply #1 on: August 30, 2019, 15:43:31 pm »
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 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

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9969
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Default Product Image Action Changed
« Reply #2 on: August 30, 2019, 16:28:37 pm »
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/