News:

Support the VirtueMart project and become a member

Main Menu

Problem wit SEF and JSON

Started by tarichecco, May 30, 2014, 10:32:16 AM

Previous topic - Next topic

tarichecco

Hi all,

I'm developing a site with Joomla 2.5.20 and virtuemart 2.6.4

I've a problem when SEF is enabled and I try to get the state list after selected a country.
When the system try to get state list

http://[mysitedomain]/index.php/it/index.php?option=com_virtuemart&view=state&format=json&virtuemart_country_id=105

get a 404 error.

If I disable SEF all works fine.

At the moment I edit the file components\com_virtuemart\assets\js\vmsite.js

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

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

And all works fine with SEF.

I dont' like to hack core file....is there another way to resolve this problem?

Thank you very much!