Jump to content

City field missing from Add an Address


Recommended Posts

The City field has stopped appearing when adding a new address (though it is okay when the user first registers their address) so because City is required, no new orders can be delivered to separate shipping addresses.

 

This originally worked fine until I amended a country to serve as a mailing option for British Forces, and modified the address options there. I've since reset this to default, but the above error persists.

 

I've noticed that when I try to create a new country, it first shows an address format without a city, so that might indicate where the problem is?

 

This is currently costing my customer a lot of orders, so if someone can suggest anything, I would be extremely grateful.

 

The version is 1.4.7.0 and the URL is http://www.bakewelltarts.co.uk/

Edited by SMJobar (see edit history)
Link to comment
Share on other sites

No. The only other thing I've modified before this error cropped up was to change the settings in the Good Relationship module. I've also been through all the files in the root and in the Prestashop theme, and none of these shows a changed date

Link to comment
Share on other sites

very odd, if you look at /themes/prestashop/address.tpl do you see something like


<p class="required text">
<label for="city">{l s='City'}</label>
<input type="text" name="city" id="city" value="{if isset($smarty.post.city)}{$smarty.post.city}{else}{if isset($address->city)}{$address->city|escape:'htmlall':'UTF-8'}{/if}{/if}" maxlength="64" />
<sup>*</sup>
</p>

Link to comment
Share on other sites

Thanks. I've found the following:

 

<p class="required text">
  <label for="city"><?php echo smartyTranslate(array('s'=>'City'),$_smarty_tpl);?>
</label>
  <input type="text" name="city" id="city" value="<?php if (isset($_POST['city'])){?><?php echo $_POST['city'];?>
<?php }else{ ?><?php if (isset($_smarty_tpl->getVariable('address',null,true,false)->value->city)){?><?php echo smarty_modifier_escape($_smarty_tpl->getVariable('address')->value->city,'htmlall','UTF-8');?>
<?php }?><?php }?>" maxlength="64" />
  <sup>*</sup>
 </p>

Link to comment
Share on other sites

"This originally worked fine until I amended a country to serve as a mailing option for British Forces, and modified the address options there. I've since reset this to default, but the above error persists."

 

This is very odd, I took a look at your website, and no city field for any country that I tested.

 

Do you see the 'city' in the address format for the testing or any other country?

09.08.2012-07.45.26.png

http://screencast.com/t/nIuXl0Ay

 

If you have the experience you could try the following:

 

access your mysql db via PHPMYADMIN

-obtain a fresh copy of table address_format

export your existing (yourdbprefix)_address_format (back up)

empty the table address_format

import the fresh copy of table address_format

 

but basically your address_format table will look like you back office country address format data

  • Like 1
Link to comment
Share on other sites

The countries are currently set to

 

 

firstname lastname

company

vat_number

address1

address2

postcode city

Country:name

phone

 

but if I try to create a new country, this is what appears

 

 

firstname lastname

address1

address2

postcode

Country:name

phone

 

I'm not used to MySQL, but suspect that might be where the problem lies, so I'll see if I can manage to follow your instructions

Link to comment
Share on other sites

I've upgraded to 1.4.9 but that didn't solve it. I used MySQL Admin to upload a previous version of the address-format table which solved the City problem, and everything looked great until I tried to join as a new member and found it now didn't show a Postcode field when I tried to add an address even though it appears to be there in the Country settings. I did a complete restore of the latest backup, and the City problem is there again

Link to comment
Share on other sites

Solved. Redid the restore of the address-format table AND checked I had Postcode Required selected for the UK (must have been switched during investigations).

 

Many thanks to Tomerg3 for helping chase this down and to Elpatron for cornering it. You've saved me from an early grave.

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