Jump to content

Change default country when customer adds their address


Recommended Posts

I have and they haven't come back to me and its been a few days.


I only have a little knowledge but I presume the system is telling it to pick a country from somewhere selected in the back office. Is it possible to override this and change the code to pick the United Kingdom id?


ok works on default bootstrap and on 'quality' theme like leo digital :)


you would need to compare the address.tpl of your theme with boot-strap default theme.


at the very end of boot-strap address.tpl you see something like this.  (back up before making any changes)

{if isset($smarty.post.id_state) && $smarty.post.id_state}
	{addJsDef idSelectedState=$smarty.post.id_state|intval}
{else if isset($address->id_state) && $address->id_state}
	{addJsDef idSelectedState=$address->id_state|intval}
	{addJsDef idSelectedState=false}
{if isset($smarty.post.id_country) && $smarty.post.id_country}
	{addJsDef idSelectedCountry=$smarty.post.id_country|intval}
{else if isset($address->id_country) && $address->id_country}
	{addJsDef idSelectedCountry=$address->id_country|intval}
	{addJsDef idSelectedCountry=false}
{if isset($countries)}
	{addJsDef countries=$countries}
{if isset($vatnumber_ajax_call) && $vatnumber_ajax_call}
	{addJsDef vatnumber_ajax_call=$vatnumber_ajax_call}

Link to comment
Share on other sites

El Patron - I have cleared all cookies and still the same.


Paulito - Yes, I have the British pack installed.


So I think I may have to admit defeat on this one. Something which will at least help would be if I could change the order of the fields.


If I wanted them to appear in the below order, what would I need to change:


First Name

Last Name


Postcode / Zip Code


Address Line 2



Home Phone

Mobile Phone

Link to comment
Share on other sites

  • 7 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...