#9 Issues with Jquery Script - Required Field

Posted in ‘ReqText VirtueMart Plugin’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by uwix on Friday, 15 August 2014 15:22 CEST

uwix
Original post by Tim Baker - May 28th 2014 in the Support Forum:

I have an issue with the "Required Field". When empty it still allowed Add to Cart.
I realised it was a script conflict and installed jQuery Easy. When enabled the "Required Field" worked but to many features on the Reviver VirtueMart Template I am using stopped working. (A quick view popup and a "magnified product image viewer). On closer inspection it seems the Default Joomla 2.5 System - jQuery & jQuery UI Plugin is disabled and in Virtuemart "Using the VirtueMart jQuery" is also disabled.

I guess the function isn't working because it cannot reference a jquery library

Is there anyway I can get the "Required Field" part running without changing the Jquery settings - as this would require even more fixing?

Development site location: www.lovemeat.com.au/newsite2

Product Using Field: www.lovemeat.com.au/newsite2/index.php/s...e-of-klippies-detail

Bug? That's not a bug, that's a feature. :-)

uwix
The ReqText plugin requires the jQuery plugin enabled (from VirtueMart or from the plugin itself).

By inspecting your development site location I notice a lot of JS script are being loaded and declared. It's hard to say where the problem exactly appears because of many plugins/modules/extension are loading scripts (jQuery, MooTools and others).

The jQuery Easy plugin could give you a good solution because you can include or exclude the loading of custom JS files and a lot more options. But it'll take you a while to figure it all out on your current site.

Is there any way you can minize the usage of custom extensions/plugins? Or do you have the possibility to create a test enviroment where your can experiment with disabling plugins one-by-one? That way you can determine where the problem starts.

You are right when you conclude it is most likely a javacsript conflict (jQuery); but finding out where is the solution in this case.
Also use the error console in FireFox; this will show JS errors.

If I can assist you more, please let me know.

Bug? That's not a bug, that's a feature. :-)

uwix
Respons from Tim Baker - June 2nd 2014:

It seems your plugin requires jQuery 1.9 or above.
The website I'm working on uses jQuery 1.8. There must be a lot of depreciated functions being called in the scripts running on the site because using JQuery Easy to change it jQuery 1.9 causes a lot a failures. Trying to load 1.8 and 1.9 together has so far been unsuccessful.

My question is - is it possible to make changes to your script to work with jQuery 1.8?

Bug? That's not a bug, that's a feature. :-)

uwix
Sorry to say - but our ReqText needs atleast jQuery version 1.6.1 (as it is used default by the VirtueMart component) and does not require jQuery 1.9.

The ReqText plugin installation package doesn't even contain any jQuery version. The reason for this is that it uses the jQuery loaded by the VirtueMart component.

I wanted to take another look on your sample links provided in this post, but.... I cannot access anything because of a "suspended account".

So I'll have to refer you back to other extensions/plugins loaded on your site. One of those could cause the conflict and also keep in mind your template could cause the conflict.
If you have any other weblinks for me I'll take a close look what else I can discover.

To answer your question about changing the ReqText plugin for usage with jQuery 1.8; that shouldn't be necessary 'cause it works with jquery version 1.6.1 :-)

Bug? That's not a bug, that's a feature. :-)

uwix
Respons from Tim Baker - June 3rd 2014:

Thanks for your help.

I suspect changing the jQuery version to 1.9 may have stopped the other scripts that conflicted with your plugin - I made the wrong conclusion.

The reason the Account was suspended was "Processes hammering the server"

I guess the site template is loading far too many scripts and CSS.

I think I'd better try a different template - not so pretty but more friendly to the shared hosting server. I've tested your plugin on other Joomla 2.5/Virtuemart 2 sites and it works fine.

Bug? That's not a bug, that's a feature. :-)

Support Availability

Working days: Monday to Friday. The is available 24 hours a day, 7 days a week but will only be answered during workings days according CET.
Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 48 hours. When we expect longer delays we will notify you when you file a ticket or reply.