VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: redneckws on October 18, 2016, 17:11:16 PM

Title: Not able to select state/province
Post by: redneckws on October 18, 2016, 17:11:16 PM
Since updating to Joomla 3.6.2 I have been having issues with registration.

I'm using VirtueMart 3.0.18, the registration is fine but when I go to add a mailing address and such it won't let me select a Province or State. The Province's and State's are all published and worked perfectly fine before the update.

Is there anything we can do to fix this issue?
Title: Re: Not able to select state/province
Post by: GJC Web Design on October 19, 2016, 00:30:37 AM
it is always JS related.. without a live url no one can help you
Title: Re: Not able to select state/province
Post by: redneckws on October 24, 2016, 16:54:01 PM
www.karamat.com
Title: Re: Not able to select state/province
Post by: VMTemplates.net on October 24, 2016, 18:14:38 PM
Hi,

it's chosen jQuery script issue. You can try following:

1. Try to delete override for this view:
/templates/TEMPLATE_NAME/html/com_virtuemart/user/edit_address.php
or simply rename this file to for example:
/templates/TEMPLATE_NAME/html/com_virtuemart/user/OLD_edit_address.php

2. Add following script somewhere in head in your ./template/TEMPLATE_NAME/index.php file:

<script type="text/javascript">//<![CDATA[
jQuery(document).ready( function() {
jQuery("#shipto_virtuemart_country_id_field").trigger("chosen:updated");
}); //]]>
</script>

3. Or try to destroy chosen script for the state field and add following script somewhere in head in your ./template/TEMPLATE_NAME/index.php file:

<script type="text/javascript">//<![CDATA[
jQuery(document).ready( function() {
jQuery("#shipto_virtuemart_country_id_field").chosen("destroy");
}); //]]>
</script>

Otherwise you may need to contact template provider

Thanks,
Jason.
Title: Re: Not able to select state/province
Post by: redneckws on October 26, 2016, 17:15:17 PM
I do not have index.php in that folder, I have index.html. Would this make a difference? It's a template created on Artisteer, would it help recreating it?
Title: Re: Not able to select state/province
Post by: VMTemplates.net on November 02, 2016, 19:47:58 PM
Hi,

unfortunately, I don't know if recreating the template may help. I don't know how the templates from Artisteer works and what kind of changes to an original VirtueMart and Joomla HTML overrides they did to get the visual builder to work with it. The only I can recommend you is to try to contact Artisteer support and ask for the help.

Thanks,
Jason.
Title: Re: Not able to select state/province
Post by: jenkinhill on November 02, 2016, 23:28:50 PM
With artisteer templates it is usually difficult to work out what is causing problems, as the crapisteer system does not generate standard Joomla code.

Earlier GJC said "it is always JS related" and indeed it is here. The console error is:
TypeError: jQuery(...).chosen is not a function
http://www.karamat.com/shop
Line 76

You are loading an old version of jQuery and not loading any of the VirtueMart scripts. You also have jQueryEasy installed for some reason - a misconfiguration of this plugin can also cause chosen.js issues.
Title: Re: Not able to select state/province
Post by: Jumbo! on November 03, 2016, 08:09:10 AM
1. Disable jQueryEasy plugin.
2. Enable "Use jQuery chosen for dropdowns in FE" in VirtueMart configuration.

Now check again.
Title: Re: Not able to select state/province
Post by: redneckws on November 14, 2016, 20:16:36 PM
I have disabled jQuery Easy and set the VM confirguration to "use jQuery chosen for dropdowns in FE". Still no change.
Title: Re: Not able to select state/province
Post by: Jumbo! on November 14, 2016, 21:14:08 PM
You have also disabled "Using the Script ajax Countries/Regions" option in VM Configuration. You need to enable the same.