Forum Support

Shape 5
October 15, 2021, 09:18:44 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Shape 5 Forum
   Home   Help Search Login Register  
Pages: [1]
Author Topic: Javascript load order (specifically re VirtueMart)  (Read 304 times)
Jr. Member
Offline Offline

Posts: 14

« on: July 28, 2013, 09:19:36 AM »


Is there any mechanism in the S5/Vertex framework to change the load-order of template javascript libraries ?
( ./templates/lime_light/js/jquery/etc)

Specific issue is with VirtueMart 2.0.22 (on Joomla 2.5)
VirtueMart's FancyBox modal popup for product images insists on loading it's jquery .js script before lime_light loads it's jquery libs.

Is there any way to force the lime_light libs to load just after the ./media/system/js/mootools|core|modal stuff, but before any .js called by VirtueMart ?

The general load-order precedence seems to be:-
/media/system libs (core/mootools etc)
component scripts (VM's offending thing)
template libs (jquery min & no-conflict)
module scripts (any special .js modules require)

Have you guys had to do anything special on your VirtueMart enabled templates, to deal with this sort of thing, that might be applicable here ?

I've tried a whole bunch of VirtueMart black magic to try and make it behave, but no joy.
I'm currently working around it with a *really* ugly hack - in the VirtueMart component assets I've changed their called .js to be empty files, and added the complete versions of the .js to load in vertex/css_and_js.php, just after <?php require(dirname(__FILE__)."/../js/s5_vertex_addons.php"); ?>
It works, but man, it's :nasty: (obviously it loads the VM .js in *every* page, instead of just the ones VM requires it on)

Any thoughts/advice on how I might try and address this more elegantly ?
« Last Edit: July 28, 2013, 09:38:37 AM by kurai » Logged
Jr. Member
Offline Offline

Posts: 14

« Reply #1 on: July 28, 2013, 11:29:52 AM »

Never mind ... solved the issue by using the jQuery Easy plugin by

It calls jQuery libs from Google CDN (or local paths if needed) and inserts them into <head> with the Joomla core libs, before any other plugin or module.
It also solves various other conflict/multiple-library-instances/versions issues

It seems to play nice with lime_light, and I've not seen any ill effects from it stripping out the templates jquery libs.

Hopefully this whole mess will go away when Joomla 3.5LTS arrives, with jQuery properly built in from the get go.  Roll Eyes
« Last Edit: July 28, 2013, 11:32:16 AM by kurai » Logged
Pages: [1]
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by
Valid XHTML 1.0! Valid CSS!
Looking for the largest variety in template designs? Look no more. Never buy 1 theme again. Signups start at just $89 for access to all of our themes.
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.