Jump to content

Matrice Theme - Editing registration process

Recommended Posts



I am having a couple of problems with editing the registration process, there are a couple of questions that need changing.


If you follow this link, enter an email and click create account you can see the fields country and state only give the option for United States and US States.


Warning: Link contains some adult content.




I need to change country to just United Kingdom and State to City and change all the US states to UK Cities.


I have looked through the authentication file but can't see the options to change only the names of the fields.


This is the code in authentication.tpl

<p class="required select">
  <label for="id_country">{l s='Country'}</label>
  <select name="id_country" id="id_country">
   <option value="">-</option>
   {foreach from=$countries item=v}
   <option value="{$v.id_country}" {if ($sl_country == $v.id_country)} selected="selected"{/if}>{$v.name|escape:'htmlall':'UTF-8'}</option>
 <p class="required id_state select">
  <label for="id_state">{l s='State'}</label>
  <select name="id_state" id="id_state">
   <option value="">-</option>


And this is repeated twice in the file.


I would attach the whole file but it says I am not permitted to upload this kind of file.



- Emma

Share this post

Link to post
Share on other sites

I have found this code at the top of authentication.tpl which I think is what relates to my problem:


// <![CDATA[
idSelectedCountry = {if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}false{/if};
countries = new Array();
countriesNeedIDNumber = new Array();
countriesNeedZipCode = new Array();
{if isset($countries)}
{foreach from=$countries item='country'}
 {if isset($country.states) && $country.contains_states}
  countries[{$country.id_country|intval}] = new Array();
  {foreach from=$country.states item='state' name='states'}
   countries[{$country.id_country|intval}].push({ldelim}'id' : '{$state.id_state}', 'name' : '{$state.name|escape:'htmlall':'UTF-8'}'{rdelim});
 {if $country.need_identification_number}
 {if isset($country.need_zip_code)}
  countriesNeedZipCode[{$country.id_country|intval}] = {$country.need_zip_code};
$('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state}{else}{if isset($address)}{$address->id_state|escape:'htmlall':'UTF-8'}{/if}{/if}]').attr('selected', 'selected');


I also went onto localisation in the back office of my store and imported a UK localisation pack including states and changed country locale to UK but these have made no difference.


I noticed the above code relates to smarty which I have seen somewhere in the back office could it be some settings I just need to change?

Share this post

Link to post
Share on other sites

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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More