Jump to content

Missing state in Store address on Our Stores page


Recommended Posts

Our store address is correctly listed in Preferences / Store Contacts.  However, the "Store address" on the Our Stores page, using the simplified store locator (no map), does not show the state (US).  The street, city, and zip code are there; the state is missing.

 

Any suggestion on how to fix this?

 

Thanks!

  Scott

  PrestaShop v1.6.1.7

 

Link to comment
Share on other sites

Checking Localization / Countries... Countries that are enabled include the United States, United Kingdom, France, etc.

For the address format, it shows by default...

 

firstname lastname
company
address1 address2
city, State:name postcode
Country:name
phone
phone_mobile

 

Is there something I should alter?

Link to comment
Share on other sites

Looks fine to me. Maybe your theme has hardcoded the address format? Here's what I have in themes/default-bootstrap/stores.tpl:

		            <td class="address">
		            {assign value=$store.id_store var="id_store"}
		            {foreach from=$addresses_formated.$id_store.ordered name=adr_loop item=pattern}
	                    {assign var=addressKey value=" "|explode:$pattern}
	                    {foreach from=$addressKey item=key name="word_loop"}
	                        <span {if isset($addresses_style[$key])} class="{$addresses_style[$key]}"{/if}>
	                            {$addresses_formated.$id_store.formated[$key|replace:',':'']|escape:'html':'UTF-8'}
	                        </span>
	                    {/foreach}
	                {/foreach}
	                	<br/>
						{if $store.phone}<br/>{l s='Phone:'} {$store.phone|escape:'html':'UTF-8'}{/if}
						{if $store.fax}<br/>{l s='Fax:'} {$store.fax|escape:'html':'UTF-8'}{/if}
						{if $store.email}<br/>{l s='Email:'} {$store.email|escape:'html':'UTF-8'}{/if}
						{if $store.note}<br/><br/>{$store.note|escape:'html':'UTF-8'|nl2br}{/if}
					</td>

It goes through the address format as configured on the Localization > Countries tab and then adds the phone, fax, email and note.

 

Also, make sure you've entered the states in the addresses listed at the top of the Preferences > Store Contacts page, not just at the bottom of the page.

Link to comment
Share on other sites

The default code in themes/default-bootstrap/stores.tpl is the same as in the custom theme I'm using.

 

The state is displayed correctly in the two place on the Preferences / Store Contacts page, the first section (ID) and in the lower "Contact Details" section.

 

The only possibly odd thing I notice is that when I first go the Preference / Store Contacts page and edit the store ID, there is a slight delay in the state showing up.  Yet, it is correct.

 

I suppose I could hard-code the state into stores.tpl.  We only have one store.

Link to comment
Share on other sites

I've "Clear cache" several times as we are still building our site.  The street, city, a space where the state should be, and then the zip code is displayed.  Strange.

 

I looked at hard-coding the state in stores.tpl but I'm now not sure I can do only the state.  I think it might require hard-coding the complete address.

 

- Scott

Link to comment
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...