noesac Posted July 3, 2010 Share Posted July 3, 2010 On the cart / checkout form?I just want to be very careful on the page as I've made change here before and really caused myself a lot of trouble:) Link to comment Share on other sites More sharing options...
rocky Posted July 3, 2010 Share Posted July 3, 2010 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 More sharing options...
noesac Posted July 3, 2010 Author Share Posted July 3, 2010 Hi Rocky, That didn't seem to work: http://tiny.cc/xeyvq Link to comment Share on other sites More sharing options...
rocky Posted July 3, 2010 Share Posted July 3, 2010 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 More sharing options...
noesac Posted July 3, 2010 Author Share Posted July 3, 2010 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 More sharing options...
rocky Posted July 3, 2010 Share Posted July 3, 2010 Yes, it appears the module overrides authentication.tpl, so it shouldn't matter if you leave the code changed. Link to comment Share on other sites More sharing options...
noesac Posted July 3, 2010 Author Share Posted July 3, 2010 Thanks Rocky will mark as solved Link to comment Share on other sites More sharing options...
noesac Posted July 4, 2010 Author Share Posted July 4, 2010 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 More sharing options...
rocky Posted July 4, 2010 Share Posted July 4, 2010 It might not be needed, but I suppose you may as well leave it changed so if you uninstall the one-page-checkout module, the fields will still be swapped. Link to comment Share on other sites More sharing options...
noesac Posted July 4, 2010 Author Share Posted July 4, 2010 ok so it would just be a matter of positioning, like it wouldn't cause a technical issue either way? Link to comment Share on other sites More sharing options...
rocky Posted July 4, 2010 Share Posted July 4, 2010 That's right. Link to comment Share on other sites More sharing options...
noesac Posted July 4, 2010 Author Share Posted July 4, 2010 Great thanks! Will give this a shot, in some countries it doesn't make sense to have postcode before the city so it makes for an unusual flow for the customer. Link to comment Share on other sites More sharing options...
Recommended Posts