New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address format #1959

Merged
merged 8 commits into from Feb 4, 2016

Conversation

Projects
None yet
2 participants
@bibich
Contributor

bibich commented Feb 1, 2016

This pull request aims to provide a way to display an address according to a country.

A new smarty function format_address is available. This function formats the address according to the address country :

{* format Address 1 in html *}
{format_address address="1"}

{* format Address 1 in html and in french (default is the session lang) *}
{format_address address="1" locale="fr_FR"}

{* format Address 1 in html with custom tag and attributes *}
{format_address address="1" html_tag="address" html_class="customer-address" html_id="address1" }

{* format Address 1 in plain text *}
{format_address address="1" html="0"}

{* format Address 1 as a postal label *}
{format_address postal="1" address="1"}

{* format Address 1 as a postal label and set the origin country (default is the shop country, then the default country) *}
{format_address postal="1" address="1" origin_country='FR'}

{* format order address 1 *}
{format_address order_address="1"}

{* format a custom address *}
{format_address 
    recipient="M. Barack Obama" 
    organization="The White House" 
    address_line1="1600 Pennsylvania Avenue NW" 
    postal_code="20500"
    locality="Washington"
    country_code="US"
    administrative_area="US-DC"
}

@bibich bibich added the enhancement label Feb 1, 2016

@bibich bibich self-assigned this Feb 1, 2016

@bibich bibich added this to the 2.3.0-alpha2 milestone Feb 1, 2016

@gillesbourgeat

This comment has been minimized.

Show comment
Hide comment
@gillesbourgeat

gillesbourgeat Feb 4, 2016

Member

Thanks !

Member

gillesbourgeat commented Feb 4, 2016

Thanks !

gillesbourgeat added a commit that referenced this pull request Feb 4, 2016

@gillesbourgeat gillesbourgeat merged commit 1191c70 into thelia:master Feb 4, 2016

2 checks passed

Scrutinizer 2 new issues, 11 updated code elements
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

gillesbourgeat added a commit to gillesbourgeat/thelia that referenced this pull request Feb 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment