Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

112 lines (102 sloc) 4.751 kb
* =|= Addresses ================================================
* Display customer's addresses in My Account.
* ==============================================================
** Retro compatibility for PrestaShop version < with a recent theme
{* Two variable are necessaries to display the address with the new layout system *}
{* Will be deleted for 1.5 version and more *}
{if !isset($multipleAddresses)}
{$ignoreList.0 = "id_address"}
{$ignoreList.1 = "id_country"}
{$ignoreList.2 = "id_state"}
{$ignoreList.3 = "id_customer"}
{$ignoreList.4 = "id_manufacturer"}
{$ignoreList.5 = "id_supplier"}
{$ignoreList.6 = "date_add"}
{$ignoreList.7 = "date_upd"}
{$ignoreList.8 = "active"}
{$ignoreList.9 = "deleted"}
{* PrestaShop < 1.4.2 compatibility *}
{if isset($addresses)}
{$address_number = 0}
{foreach from=$addresses key=k item=address}
{counter start=0 skip=1 assign=address_key_number}
{foreach from=$address key=address_key item=address_content}
{if !in_array($address_key, $ignoreList)}
{$multipleAddresses.$address_number.ordered.$address_key_number = $address_key}
{$multipleAddresses.$address_number.formated.$address_key = $address_content}
{$multipleAddresses.$address_number.object = $address}
{$address_number = $address_number + 1}
{* Define the style if it doesn't exist in the PrestaShop version*}
{* Will be deleted for 1.5 version and more *}
{if !isset($addresses_style)}
{$ = 'address_company'}
{$addresses_style.vat_number = 'address_company'}
{$addresses_style.firstname = 'address_name'}
{$addresses_style.lastname = 'address_name'}
{$addresses_style.address1 = 'address_address1'}
{$addresses_style.address2 = 'address_address2'}
{$ = 'address_city'}
{$ = 'address_country'}
{$ = 'address_phone'}
{$addresses_style.phone_mobile = 'address_phone_mobile'}
{$addresses_style.alias = 'address_title'}
<script type="text/javascript">
{capture name=path}<a href="{$link->getPageLink('my-account', true)}">{l s='My account'}</a><span class="navigation-pipe">{$navigationPipe}</span>{l s='My addresses'}{/capture}
{include file="$tpl_dir./breadcrumb.tpl"}
<h1>{l s='My addresses'}</h1>
<p>{l s='Please configure your default billing and delivery addresses when placing an order. You may also add additional addresses, which can be useful for sending gifts or receiving an order at your office.'}</p>
{if isset($multipleAddresses) && $multipleAddresses}
<div class="addresses">
<h3>{l s='Your addresses are listed below.'}</h3>
<p>{l s='Be sure to update them if they have changed.'}</p>
{assign var="adrs_style" value=$addresses_style}
<div class="bloc_adresses clearfix">
{foreach from=$multipleAddresses item=address name=myLoop}
<ul class="address {if $smarty.foreach.myLoop.last}last_item{elseif $smarty.foreach.myLoop.first}first_item{/if} {if $smarty.foreach.myLoop.index % 2}alternate_item{else}item{/if}">
<li class="address_title">{$address.object.alias}</li>
{foreach from=$address.ordered name=adr_loop item=pattern}
{assign var=addressKey value=" "|explode:$pattern}
{foreach from=$addressKey item=key name="word_loop"}
<span{if isset($addresses_style[$key])} class="{$addresses_style[$key]}"{/if}>
<li class="address_update"><a href="{$link->getPageLink('address', true, null, "id_address={$|intval}")}" title="{l s='Update'}">&raquo; {l s='Update'}</a></li>
<li class="address_delete"><a href="{$link->getPageLink('address', true, null, "id_address={$|intval}&delete")}" onclick="return confirm('{l s='Are you sure?'}');" title="{l s='Delete'}">&raquo; {l s='Delete'}</a></li>
<p class="clear" />
<p class="warning">{l s='No addresses available.'}&nbsp;<a href="{$link->getPageLink('address', true)}">{l s='Add new address'}</a></p>
<div class="clear address_add"><a href="{$link->getPageLink('address', true)}" title="{l s='Add an address'}" class="button_large">{l s='Add an address'}</a></div>
<ul class="footer_links">
<li><a href="{$link->getPageLink('my-account', true)}"><img src="{$img_dir}icon/my-account.gif" alt="" class="icon" /> {l s='Back to your account'}</a></li>
<li class="f_right"><a href="{$base_dir}"><img src="{$img_dir}icon/home.gif" alt="" class="icon" /> {l s='Home'}</a></li>
Jump to Line
Something went wrong with that request. Please try again.