VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: brockp on March 20, 2012, 05:54:15 AM

Title: User Billing Address State list not being populated after country select
Post by: brockp on March 20, 2012, 05:54:15 AM
Thank you for all the work getting 2.0.x out the door. I have ran into an issue with setting a users state. When checking out or registering the user selects a country the jQuery event fires that should populate the list:

/component/virtuemart/user/index.php?option=com_virtuemart&view=state&format=json&virtuemart_country_id=207

This returns an empty list:

{"207":[]}

The countries are all activated and the states are all there.  Also I have enable ajax for state listings enabled.  I have also tried it disabled and I have the same problem.  I also don't see any errors in my apache logs.

Any idea why the list returned is empty?
Title: Re: User Billing Address State list not being populated after country select
Post by: brockp on March 20, 2012, 06:09:46 AM
Some how I had a cache in a javascript debugger, my country code isn't even 207!  Cleared everything and started over my code is 223 (USA) and everything works now.

Sorry for the noise
Title: Re: User Billing Address State list not being populated after country select
Post by: RobertL on May 03, 2012, 20:58:21 PM
Hmm, I'm having the same issue with Australian states during registration with Joomla 2.5.4 and VM 2.0.6.

Country is published and showing, states are published and not showing (empty list). All checks out fine in the backend and MySQL DB.
Title: Re: User Billing Address State list not being populated after country select
Post by: RobertL on May 04, 2012, 11:18:54 AM
Should have mentioned, clearing cache did not work for me on any browser (Firefox, Chrome,  Opera, IE9) (including clearing Joomla cache)
Title: Re: User Billing Address State list not being populated after country select
Post by: RobertL on May 04, 2012, 17:08:55 PM
I automatically disabled Configuration > Templates > "Using the Virtuemart jQuery" to stop jQuery loading multiple times. Was having exactly the same problem with Australian states. After banging my head for hours going through code, Enabling the option fixed the problem.