Jump to content

[SOLVED] How to move the Postcode / Zip code field under the "City" field


Recommended Posts

In address.tpl, change lines 62-71 from:



{l s='Postal code / Zip code'}
   <input type="text" id="postcode" name="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{else}{$address->postcode|escape:'htmlall':'UTF-8'}{/if}" />
*



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



to:



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



{l s='Postal code / Zip code'}
   <input type="text" id="postcode" name="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{else}{$address->postcode|escape:'htmlall':'UTF-8'}{/if}" />
*



and lines 167-176 of authentication.tpl from:



{l s='Postal code / Zip code'}
   <input type="text" class="text" name="postcode" id="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{/if}" />
*



{l s='City'}
   <input type="text" class="text" name="city" id="city" value="{if isset($smarty.post.city)}{$smarty.post.city}{/if}" />
*



to:



{l s='City'}
   <input type="text" class="text" name="city" id="city" value="{if isset($smarty.post.city)}{$smarty.post.city}{/if}" />
*



{l s='Postal code / Zip code'}
   <input type="text" class="text" name="postcode" id="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{/if}" />
*

Link to comment
Share on other sites

It looks like you are using a one-page checkout module, which would explain why the code isn't working. I'm not familiar with the module, so I can't help you with it. You should be able to do something similar to what I've done above. Just switch around the city and postcode blocks.

Link to comment
Share on other sites

No problems. If I leave the two files changed as above, is there any chance that will cause a problem? Should I be able to leave them as above, while I figure out how to fix the OnePageCheckout module?

Link to comment
Share on other sites

Hi Rocky, I just got instruction back from the OPC dev and told me to swap this line in order-carrier.tpl (not sure if he meant in /prestashop or /files or both):

{l s='Postal code / Zip code' template='address'}
                               <input type="text" class="text" name="postcode" id="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{else}{$fields_cookie.f_postcode}{/if}" />




With this:

 {l s='City' template='address'}
                               <input type="text" class="text" name="city" id="city" value="{if isset($smarty.post.city)}{$smarty.post.city}{else}{$fields_cookie.f_city}{/if}" />




Do you think this should be done in addition to the two changes you've described above?

Link to comment
Share on other sites

×
×
  • Create New...