I'm using VM 2.0.4, Joomla 2.53, Yoo theme called Vanilla.
I can't seem to have the default country be "United States" on checkout/register form. The store information is setup in the admin with "United States" selected. I'm only selling within the United States (continental/lower 48 states), so I deleted all other countries and Alaska and Hawaii. But yet, the country field still says "--Select--" on the frontend register form.
I have VM 1.1.8 Joomla 1.5.25 with theme JA_Purity running on another site / same server and the country works fine - default option selected is United States.
I have searched every post about that references "United States" and nothing seems to address my issue. Any help/answers please??!
Can anyone point me in a direction with this?
Bump, I'm stumped... :(
Hi,
I had the same problem because my only target is AUS..
What I did to set the default country was manipulating MySql DB.
If you have a basic knowledge of MySQL, it is easy.
All you have to do is:
1. Open MySql -> Open a 'virtuemart_countries' table which is containing the country info.
2. Find USA and write down the country number for USA (AUS is 13)
3. Open 'virtuemart_userfields' table. and find a field name called 'virtuemart_country'.
4. On the same row, insert your country code into the default column.
5. Save
6. Visit your website, and check if USA is automatically selected by default.
Also you can use this method to set a default state and so on..:)
David
[Update by Milbo]
This field is now available by default, thanks David. You just need the id of the country and enter it to the default field.
WOW!!! David, you are a life saver! This is one of those things I can now cross of my "list" that was keeping me from putting the site live. Thank you again. Next beer is on me - coffee is ok too! :D
Pleasure!! ;D
Mine is also still under a development process..one thing I need to add on my store is a date/time field on checkout process to make customer choose an order timing..
I hope you publish your site soon !
David
I added the field for default. Now you can just enter the correct id for the country.
Quote from: david.kwock on April 24, 2012, 08:22:50 AM
Hi,
I had the same problem because my only target is AUS..
What I did to set the default country was manipulating MySql DB.
If you have a basic knowledge of MySQL, it is easy.
All you have to do is:
1. Open MySql -> Open a 'virtuemart_countries' table which is containing the country info.
2. Find USA and write down the country number for USA (AUS is 13)
3. Open 'virtuemart_userfields' table. and find a field name called 'virtuemart_country'.
4. On the same row, insert your country code into the default column.
5. Save
6. Visit your website, and check if USA is automatically selected by default.
Also you can use this method to set a default state and so on..:)
David
Thank you very much
It would be nice if this is default admin option...
Thanks David and Milbo! 8)
Quote from: Milbo on December 12, 2012, 15:41:20 PM
I added the field for default. Now you can just enter the correct id for the country.
Milbo,
Thank you for adding this feature! I do have one request if possible:
It appears that to use this currently you need to look up the id number in the database. Is it possible to use the 2 or 3 character country id to set the default in a future release?
Regards
Steve
Quote from: servlet on July 11, 2013, 07:42:40 AM
Quote from: david.kwock on April 24, 2012, 08:22:50 AM
Hi,
I had the same problem because my only target is AUS..
What I did to set the default country was manipulating MySql DB.
If you have a basic knowledge of MySQL, it is easy.
All you have to do is:
1. Open MySql -> Open a 'virtuemart_countries' table which is containing the country info.
2. Find USA and write down the country number for USA (AUS is 13)
3. Open 'virtuemart_userfields' table. and find a field name called 'virtuemart_country'.
4. On the same row, insert your country code into the default column.
5. Save
6. Visit your website, and check if USA is automatically selected by default.
Also you can use this method to set a default state and so on..:)
David
Thank you very much
It would be nice if this is default admin option...
Thank you..
big shit, doesn't work my website, and nothing countries.. thanks again :(
You dont need to use the db anylonger. You can now set it directly
When I set the default country in Virtuemart Shopper Fields, it no longer lets the states drop down in billing/shipping to populate states. Once I remove the default, and select the country manually, the states become available.
How can this be solved?
You are not using a standard check out -- test on Prostar
I'm using the standard Virtuemart checkout. It was a template purchased from template monster. No code modifications. I'm considering reaching out to them. They are usually very good with "fixing" issues directly related to their templates, so long as you've not made any modifications and done your homework to ensure it's not user error.
I have looked at your site.. the checkout is not standard... but if u won't try protostar then.....
chosen.js isn't loaded .. the ajax and the json is there for the states .. what ever JS select is being used isn't rendering it
GC Web design - what is prostar?
the standard Joomla bundled template... if you use this as a test then you won't use your template over rides but the std VM templates
Or try renaming templates/YOUR_TEMPLATE/html/com_virtuemart_
then the std templates will be used
Hi Milbo,
two questions:
1) How exatly does adding default country work? I see the fields but how do I use them? (Is it first just the ID number and second as the title I want to show?) Sorry for asking stupid questions... :)
2) Is there a list of country ID's somewhere?
- Anne
When you set a default country, it is used by aspects of the cart
It becomes the "default" selected country in the address details of the shopper addresses
Yes it is an ID
the list of countries and associated ID's can be found in
virtuemart admin/configuration/countries
As an example, the UK is ID 222