{extends file="layout.tpl"} {* Security *} {block name="no-return-functions" prepend} {check_auth role="CUSTOMER" login_tpl="login"} {check_cart_not_empty} {/block} {* Body Class *} {block name="body-class"}page-order-delivery{/block} {* Breadcrumb *} {block name='no-return-functions' append} {$breadcrumbs = [ ['title' => {intl l="Cart"}, 'url'=>{url path="/cart"}], ['title' => {intl l="Billing and delivery"}, 'url'=>{url path="/order/delivery"}] ]} {/block} {block name="main-content"}

# {intl l="Billing and delivery"}

{include file="misc/checkout-progress.tpl" step="delivery"} {hook name="order-delivery.top"} {form name="thelia.order.delivery"} {assign var="isPost" value={$smarty.post|count}} {form_hidden_fields} {if $form_error}
{$form_error_message}
{/if} {hook name="order-delivery.form-top"} {form_field field='delivery-address'}
{intl l="Add a new address"} {intl l="Choose your delivery address"} {if $error} {$message} {/if}

{loop type="address" name="customer.addresses" customer="current"} {assign var="isDeliveryAddressChecked" value="0"} {if $isPost} {if $value == $ID} {assign var="isDeliveryAddressChecked" value="1"} {/if} {elseif $delivery_address_id == $ID} {assign var="isDeliveryAddressChecked" value="1"} {/if}
{if $isDeliveryAddressChecked} {$LABEL|default:{intl l='Address %nb' nb={$LOOP_COUNT}}} {intl l="Main Address"} {else} {$LABEL|default:{intl l='Address %nb' nb={$LOOP_COUNT}}} {/if} | {loop type="title" name="customer.title.info" id=$TITLE}{$SHORT}{/loop} {$LASTNAME|upper} {$FIRSTNAME|ucwords} {$COMPANY} {if $CELLPHONE != ""} {$CELLPHONE} {/if} {if $PHONE != ""} {$PHONE} {/if} | {intl l="Edit"} {if $DEFAULT != 1} {intl l="Delete"} {/if}
{/loop}

{/form_field} {form_field field='delivery-module'}
{intl l="Choose your delivery method"} {if $error} {$message} {/if}
{/form_field} {hook name="order-delivery.form-bottom"} {intl l="Back"}
{/form} {hook name="order-delivery.bottom"}
{/block} {block name="javascript-initialization"}
{hook name="order-delivery.javascript-initialization"} {/block} {block name="stylesheet"} {hook name="order-delivery.stylesheet"} {/block} {block name="after-javascript-include"} {hook name="order-delivery.after-javascript-include"} {/block}