State / Province / Region * dropdown in Virtuemart not working

Started by blackrat999, October 01, 2012, 10:01:10 AM

Previous topic - Next topic

blackrat999

I have an issue which only happens when i have SH404SEF activated but the forum related to that component say i have to get help from VM forum to fix it.

The dropdown in the shopping cart for State / Province / Region *  doesnt work when sh404sef is enabled but it does work when it is turned off.
I have seen some suggestions about jquery being loaded twice and can turn it off in Virtuemart control panel but this doesnt help.
any suggestions please ?
the live site (where i have temporarily removed the field in the cart) site is www.theclockshed.co.uk and the test site where you can see the issue in action (direct URL to the cart) is here :
http://89.200.137.238/theclocksheddemo/en/editaddresscartBT

the sh404sef resolution is as follows but if it is correct i would appreciate someone telling me how to do it !

Your problem is because this non-sef url:
index.php?option=com_virtuemart&view=state&format=json&virtuemart_country_id=222
It not rendered as absolute url, it should have at last a / slash in front, or rendered using Jrouter::_('') function.
So find the virtuemart file which renders that non-sef url and fix it


thanks for looking

bytelord

Hello,

I think is a javascript issue and not SH404SEF  or Virtuemart. You use a custom template and should try to test vm without template overrides (disable them for a moment). You also load a lot of javascript on your site and may be some scripts conflict with vm scripts. More information you could find here:

http://dev.virtuemart.net/projects/virtuemart/wiki/General_JS-Problems_with_templates_and_jQuery
http://dev.virtuemart.net/projects/virtuemart/wiki/JavascriptCSS_Template_Overrides_and_Avoiding_Conflicts_between_Libraries

Also you could use firebug to examine also what is happening in your site with your js: http://forum.virtuemart.net/index.php?topic=102850.0

The error i am receiving is this:

"NetworkError: 404 Component Not Found...locksheddemo/index.php) - http://89.200.137.238/theclocksheddemo/en/index.php?option=com_virtuemart&view=state&format=json&virtuemart_country_id=222"

So also you could to DISABLE the cache & optimize Technics you are using on your site. Your are compressing Javascript, etc. Please check your template and disable any cache or speed optimize tools you have on your site or any plugins you have for that reason and test again.

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

blackrat999

thanks - i had already tried using a default template which had the same result so i assumed the template wasnt responsible ?
i will look through the links and see if any of it means anything to me !
cheers

bytelord

ok, try also to disable for testing purposes and your modules/plugins or components that uses extra javascript to resolve it.
Also as i post you previously try to disable the compression Technics you are using over your site (do not compress CSS, Javascript, etc).

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

lancernz

Same result - the dropdown for State / Province / Region won't produce a list in the live site but on the development site it does.

I'm not aware of any javascript errors, or any other underlying issue(s). Testing with both SSL on/off produces the same non dropdown result.

Running Virtuemart 2.0.10 and Joomla! 2.5.7 - the only difference between the two sites is the live one runs Nginx as the webserver and the development is Apache.

Any hints/clues/ideas that may get the dropdown working again please?

Live site: https://www.v8st.co.nz/merchandise/shop/user/editaddresscheckoutBT.html
Dev site: https://174.120.194.2/~v8supert/merchandise/shop/user/editaddresscheckoutBT.html

bytelord

Hi,

But there is a js conflict when country selected, use firebug to test it.
"NetworkError: 404 Not Found - https://www.v8st.co.nz/merchandise/shop/user/index.php?option=com_virtuemart&view=state&format=json&virtuemart_country_id=50"

Also please disable the cache and test again.

Regards


Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

datagroove

The issue the OP is facing here is the same I am facing now, the 404 is not due to a javascript issue, javascript is making an ajax request to the proper URL but the URL is not being processed by NGINX correctly, same for me.

I do not know what the right NGINX config is for this (maybe virtuemart can have an official page for nginx config?) but for the time being, I am using this fix: http://forum.virtuemart.net/index.php?topic=125965.msg431493#msg431493

Daerimin

If you're getting a 404 from the Ajax request when you select a country, check this.  It solved this issue for me:

In /components/com_virtuemart/assets/js/vmsite.js,

There is a line that reads:

     $.getJSON('index.php?option=com_virtuemart&view=state&format=json&virtuemart_country_id=' + byAjax,

By changing this line to:

     $.getJSON('/index.php?option=com_virtuemart&view=state&format=json&virtuemart_country_id=' + byAjax,

... suddenly the states dropdown functionality works.