Display warning message if the user has no order

This commit is contained in:
touffies
2013-10-16 16:57:25 +02:00
parent 9d23ce87ac
commit c939d14e22

View File

@@ -1,18 +1,18 @@
{extends file="layout.tpl"} {extends file="layout.tpl"}
{block name="no-return-functions"} {block name="no-return-functions" prepend}
{check_auth context="front" roles="CUSTOMER" login_tpl="login"} {check_auth context="front" roles="CUSTOMER" login_tpl="login"}
{/block} {/block}
{block name="body-class"}page-account{/block}
{* Breadcrumb *} {* Breadcrumb *}
{block name='no-return-functions' append} {block name='no-return-functions' append}
{$breadcrumbs = [ {$breadcrumbs = [
['title' => {intl l="Account"}, 'url'=>{url path="/account"}] ['title' => {intl l="Account"}, 'url'=>{url path="/account"}]
]} ]}
{/block} {/block}
{block name="body-class"}page-account{/block}
{block name="main-content"} {block name="main-content"}
<div class="main"> <div class="main">
@@ -45,7 +45,7 @@
<span class="extended-address">{$ADDRESS3}</span><br> <span class="extended-address">{$ADDRESS3}</span><br>
{/if} {/if}
<span class="postal-code">{$ZIPCODE}</span> <span class="postal-code">{$ZIPCODE}</span>
<span class="locality">{$CITY}, <span class="country-name">{loop type="country" name="customer.country.info" id=$COUNTRY}{$TITLE}{/loop}</span></span> <span class="locality">{$CITY}<br><span class="country-name">{loop type="country" name="customer.country.info" id=$COUNTRY}{$TITLE}{/loop}</span></span>
</address> </address>
</li> </li>
<li> <li>
@@ -139,6 +139,7 @@
</div> </div>
<div id="account-orders" class="panel-collapse collapse"> <div id="account-orders" class="panel-collapse collapse">
<div class="panel-body table-responsive"> <div class="panel-body table-responsive">
{ifloop rel="customer.orders"}
<table class="table table-orders" summary="{intl l="List of orders"}"> <table class="table table-orders" summary="{intl l="List of orders"}">
<thead> <thead>
<tr> <tr>
@@ -162,6 +163,7 @@
</tbody> </tbody>
</table> </table>
{/ifloop}
{elseloop rel="customer.orders"} {elseloop rel="customer.orders"}
<div class="orders-warning"> <div class="orders-warning">
<strong>{intl l="Warning"}!</strong> {intl l="You don't have orders yet."} <strong>{intl l="Warning"}!</strong> {intl l="You don't have orders yet."}