Hello,
I saw that fancybox does not work only with joomla 3.9.11 native jQuery version (1.12.4), but only with version 1.9.2 (this was tested on VM v3.6 and 3.5, vmbeez template).
So, in order to make it work, the VM jQuery must be loaded too, which makes jQuery to be loaded twice (different versions).
Is there a replacement for fancybox that works with jQuery v1.12.4?
Yes but not free for commercial use.
Jörgen @ Kreativ Fotografi
Ah...
Actually, on the cart page, if "Load the VM jQuery framework" wasn't ticked in VM configuration, fancybox did not load at all. Fancybox actually works with the v1.12.4 of jQuery.
I found a workaround to this:
I modified the file /templates/<TEMPLATE_NAME>/html/com_virtuemart/cart/default.php
by adding
if(VmConfig::get('usefancy',1)){
vmJsApi::addJScript('fancybox/jquery.fancybox-1.3.4.pack',false, false);
vmJsApi::css('jquery.fancybox-1.3.4');
}
right after
vmJsApi::vmValidator();
(about line 25)
In this case, fancybox works without selecting loading any of the jQuery frameworks in the VM configuration (only with the one of the Joomla! template, if it loads jQuery independently of VM).
Actually, if I deactivate load "VM jQuery framework" in VM configuration, the add to cart in a popup functionality does not work any longer.
the function loadPopUpLib in vmjsapi.php has in line 484
if(!VmConfig::get ('jquery', true)) {
return true;
}
I think this is old and should be removed.