Jump to content

address format - im using 1.4.8


fernandokerber

Recommended Posts

hi!

 

I need some help here.

 

I want to put an hyphen ( "-" ) between the post code.

Here in Brazil our post code format is xxxxx-xxx

 

In the country options, I set "Zip/post code format" to "NNNNN-NNN"

But in my shipping address the number appears like NNNNNNNN. Without the hyphen....

 

Any help?

 

 

I have other problem, I need to separate the City name from the State name wth a bar ( "/" ). How could I do that?

 

I attached an image to ilustrate my issue.

 

Thanks in advance.

 

post-243822-0-02041500-1348758961_thumb.jpg

Link to comment
Share on other sites

Hi Fernando,

 

You can try this modification of /classes/AddressFormat.php

public static function generateAddress(Address $address, $patternRules, $newLine = "\r\n", $separator = ' ', $style = array())
{

 $addressFields = AddressFormat::getOrderedAddressFields($address->id_country);
 $addressFormatedValues = AddressFormat::getFormattedAddressFieldsValues($address, $addressFields);

if (isset($addressFormatedValues['city'])){$addressFormatedValues['city'].='/';}

 

It will add a '/' between city and state.

 

Hoping it will help you

 

Regards

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