order admin

This commit is contained in:
Etienne Roudeix
2013-09-24 12:10:22 +02:00
parent 93e7a4dc90
commit 4600727163
7 changed files with 456 additions and 435 deletions

View File

@@ -63,7 +63,6 @@ class Customer extends BaseLoop
) )
), ),
Argument::createBooleanTypeArgument('reseller'), Argument::createBooleanTypeArgument('reseller'),
Argument::createBooleanTypeArgument('last_order'),
Argument::createIntTypeArgument('sponsor') Argument::createIntTypeArgument('sponsor')
); );
} }
@@ -130,20 +129,6 @@ class Customer extends BaseLoop
$loopResultRow->set("SPONSOR", $customer->getSponsor()); $loopResultRow->set("SPONSOR", $customer->getSponsor());
$loopResultRow->set("DISCOUNT", $customer->getDiscount()); $loopResultRow->set("DISCOUNT", $customer->getDiscount());
$lastOrderDate = "";
$lastOrderAmount = "";
if ($this->getLastOrder()) {
$order = $customer->getOrders()->getFirst();
if ($order) {
$lastOrderDate = $order->getCreatedAt();
$lastOrderAmount = $order->getTotalAmount();
}
}
$loopResultRow->set("LASTORDER_DATE", $lastOrderDate);
$loopResultRow->set("LASTORDER_AMOUNT", $lastOrderAmount);
$loopResult->addRow($loopResultRow); $loopResult->addRow($loopResultRow);
} }

View File

@@ -32,6 +32,7 @@ use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
use Thelia\Core\Template\Loop\Argument\Argument; use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Model\AddressQuery; use Thelia\Model\AddressQuery;
use Thelia\Model\OrderAddressQuery;
use Thelia\Type\TypeCollection; use Thelia\Type\TypeCollection;
use Thelia\Type; use Thelia\Type;
@@ -54,29 +55,7 @@ class OrderAddress extends BaseLoop
protected function getArgDefinitions() protected function getArgDefinitions()
{ {
return new ArgumentCollection( return new ArgumentCollection(
new Argument( Argument::createIntTypeArgument('id', null, true)
'id',
new TypeCollection(
new Type\IntListType(),
new Type\EnumType(array('*', 'any'))
)
),
new Argument(
'customer',
new TypeCollection(
new Type\IntType(),
new Type\EnumType(array('current'))
),
'current'
),
Argument::createBooleanOrBothTypeArgument('default'),
new Argument(
'exclude',
new TypeCollection(
new Type\IntListType(),
new Type\EnumType(array('none'))
)
)
); );
} }
@@ -91,60 +70,27 @@ class OrderAddress extends BaseLoop
$id = $this->getId(); $id = $this->getId();
if (null !== $id && !in_array($id, array('*', 'any'))) { $search->filterById($id, Criteria::IN);
$search->filterById($id, Criteria::IN);
}
$customer = $this->getCustomer(); $orderAddresses = $this->search($search, $pagination);
if ($customer === 'current') { $loopResult = new LoopResult($orderAddresses);
$currentCustomer = $this->securityContext->getCustomerUser();
if ($currentCustomer === null) {
return new LoopResult();
} else {
$search->filterByCustomerId($currentCustomer->getId(), Criteria::EQUAL);
}
} else {
$search->filterByCustomerId($customer, Criteria::EQUAL);
}
$default = $this->getDefault(); foreach ($orderAddresses as $orderAddress) {
$loopResultRow = new LoopResultRow($loopResult, $orderAddress, $this->versionable, $this->timestampable, $this->countable);
if ($default === true) {
$search->filterByIsDefault(1, Criteria::EQUAL);
} else if($default === false) {
$search->filterByIsDefault(0, Criteria::EQUAL);
}
$exclude = $this->getExclude();
if (null !== $exclude && 'none' !== $exclude) {
$search->filterById($exclude, Criteria::NOT_IN);
}
$addresses = $this->search($search, $pagination);
$loopResult = new LoopResult($addresses);
foreach ($addresses as $address) {
$loopResultRow = new LoopResultRow($loopResult, $address, $this->versionable, $this->timestampable, $this->countable);
$loopResultRow $loopResultRow
->set("ID", $address->getId()) ->set("ID", $orderAddress->getId())
->set("LABEL", $address->getLabel()) ->set("TITLE", $orderAddress->getCustomerTitleId())
->set("CUSTOMER", $address->getCustomerId()) ->set("COMPANY", $orderAddress->getCompany())
->set("TITLE", $address->getTitleId()) ->set("FIRSTNAME", $orderAddress->getFirstname())
->set("COMPANY", $address->getCompany()) ->set("LASTNAME", $orderAddress->getLastname())
->set("FIRSTNAME", $address->getFirstname()) ->set("ADDRESS1", $orderAddress->getAddress1())
->set("LASTNAME", $address->getLastname()) ->set("ADDRESS2", $orderAddress->getAddress2())
->set("ADDRESS1", $address->getAddress1()) ->set("ADDRESS3", $orderAddress->getAddress3())
->set("ADDRESS2", $address->getAddress2()) ->set("ZIPCODE", $orderAddress->getZipcode())
->set("ADDRESS3", $address->getAddress3()) ->set("CITY", $orderAddress->getCity())
->set("ZIPCODE", $address->getZipcode()) ->set("COUNTRY", $orderAddress->getCountryId())
->set("CITY", $address->getCity()) ->set("PHONE", $orderAddress->getPhone())
->set("COUNTRY", $address->getCountryId())
->set("PHONE", $address->getPhone())
->set("CELLPHONE", $address->getCellphone())
->set("DEFAULT", $address->getIsDefault())
; ;
$loopResult->addRow($loopResultRow); $loopResult->addRow($loopResultRow);

View File

@@ -4,7 +4,7 @@
/* Thelia */ /* Thelia */
/* */ /* */
/* Copyright (c) OpenStudio */ /* Copyright (c) OpenStudio */
/* email : info@thelia.net */ /* email : info@thelia.net */
/* web : http://www.thelia.net */ /* web : http://www.thelia.net */
/* */ /* */
/* This program is free software; you can redistribute it and/or modify */ /* This program is free software; you can redistribute it and/or modify */
@@ -23,33 +23,77 @@
namespace Thelia\Core\Template\Loop; namespace Thelia\Core\Template\Loop;
use Thelia\Core\Template\Element\BaseLoop; use Propel\Runtime\ActiveQuery\Criteria;
use Thelia\Core\Template\Element\BaseI18nLoop;
use Thelia\Core\Template\Element\LoopResult; use Thelia\Core\Template\Element\LoopResult;
use Thelia\Core\Template\Element\LoopResultRow;
use Thelia\Core\Template\Loop\Argument\ArgumentCollection; use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
use Thelia\Core\Template\Loop\Argument\Argument; use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Model\OrderStatusQuery;
/** /**
* *
* @package Thelia\Core\Template\Loop * OrderStatus loop
* *
* @author Franck Allimant <franck@cqfdev.fr> *
* Class OrderStatus
* @package Thelia\Core\Template\Loop
* @author Etienne Roudeix <eroudeix@openstudio.fr>
*/ */
class OrderStatus extends BaseLoop class OrderStatus extends BaseI18nLoop
{ {
public function getArgDefinitions() public $timestampable = true;
/**
* @return ArgumentCollection
*/
protected function getArgDefinitions()
{ {
return new ArgumentCollection(); return new ArgumentCollection(
Argument::createIntListTypeArgument('id')
);
} }
/** /**
* * @param $pagination
* *
* @return \Thelia\Core\Template\Element\LoopResult * @return \Thelia\Core\Template\Element\LoopResult
*/ */
public function exec(&$pagination) public function exec(&$pagination)
{ {
// TODO : a coder ! $search = OrderStatusQuery::create();
return new LoopResult();
/* manage translations */
$locale = $this->configureI18nProcessing($search);
$id = $this->getId();
if (null !== $id) {
$search->filterById($id, Criteria::IN);
}
/* perform search */
$orderStatusList = $this->search($search, $pagination);
$loopResult = new LoopResult($orderStatusList);
foreach ($orderStatusList as $orderStatus) {
$loopResultRow = new LoopResultRow($loopResult, $orderStatus, $this->versionable, $this->timestampable, $this->countable);
$loopResultRow->set("ID", $orderStatus->getId())
->set("IS_TRANSLATED",$orderStatus->getVirtualColumn('IS_TRANSLATED'))
->set("LOCALE",$locale)
->set("CODE", $orderStatus->getCode())
->set("TITLE", $orderStatus->getVirtualColumn('i18n_TITLE'))
->set("CHAPO", $orderStatus->getVirtualColumn('i18n_CHAPO'))
->set("DESCRIPTION", $orderStatus->getVirtualColumn('i18n_DESCRIPTION'))
->set("POSTSCRIPTUM", $orderStatus->getVirtualColumn('i18n_POSTSCRIPTUM'))
;
$loopResult->addRow($loopResultRow);
}
return $loopResult;
} }
} }

View File

@@ -111,26 +111,26 @@
{/loop} {/loop}
{loop name="menu-auth-order" type="auth" roles="ADMIN" permissions="admin.orders.view"} {loop name="menu-auth-order" type="auth" roles="ADMIN" permissions="admin.orders.view"}
<li class="dropdown {if $admin_current_location == 'customer'}active{/if}" id="orders_menu" data-toggle="dropdown"> <li class="dropdown {if $admin_current_location == 'customer'}active{/if}" id="orders_menu">
<a href="#">{intl l="Orders"} <span class="caret"></span></a> <a href="#" class="dropdown-toggle" data-toggle="dropdown">{intl l="Orders"} <span class="caret"></span></a>
<ul class="dropdown-menu config_menu" role="menu"> <ul class="dropdown-menu config_menu" role="menu">
<li role="menuitem"><a data-target="{url path='admin/orders'}" href="{url path='admin/orders'}"> <li role="menuitem"><a data-target="{url path='admin/orders'}" href="{url path='admin/orders'}">
{intl l="All orders"} {intl l="All orders"}
<span class="badge badge-important">{count type="order"}</span></a> <span class="badge">{count type="order"}</span></a>
</li> </li>
{loop name="order-status-list" type="order-status"} {loop name="order-status-list" type="order-status"}
<li role="menuitem"> <li role="menuitem">
<a data-target="{url path='admin/orders/$LABEL'}" href="{url path='admin/orders/$LABEL'}"> <a data-target="{url path='admin/orders/$LABEL'}" href="{url path='admin/orders/$LABEL'}">
{$LABEL} <span class="badge badge-important">{count type="order" status="{$ID}"}</span> {$LABEL} <span class="badge">{count type="order" status="{$ID}"}</span>
</a> </a>
</li> </li>
{/loop} {/loop}
</ul> </ul>
</li> </li>
{/loop} {/loop}
{loop name="menu-auth-catalog" type="auth" roles="ADMIN" permissions="admin.catalog.view"} {loop name="menu-auth-catalog" type="auth" roles="ADMIN" permissions="admin.catalog.view"}

View File

@@ -64,9 +64,21 @@
</thead> </thead>
<tbody> <tbody>
{loop name="customer_list" type="customer" current="false" visible="*" last_order="1" backend_context="1" page={$customer_page} limit={$display_customer}} {loop name="customer_list" type="customer" current="false" visible="*" backend_context="1" page={$customer_page} limit={$display_customer}}
{assign "lastOrderDate" ''}
{assign "lastOrderAmount" ''}
{assign "lastOrderCurrency" ''}
{loop type="order" name="last-order" customer=$ID order="create-date-reverse" limit="1"}
{assign "lastOrderDate" "{format_date date=$CREATE_DATE}"}
{assign "lastOrderAmount" "{format_number number=$TOTAL_TAXED_AMOUNT}"}
{loop type="currency" name="order-currency" id=$CURRENCY}
{assign "lastOrderCurrency" $SYMBOL}
{/loop}
{/loop}
<tr> <tr>
<td><a href="{url path="/admin/customer/update/{$ID}" }">{$REF}</a></td> <td><a href="{url path="/admin/customer/update/{$ID}"}">{$REF}</a></td>
<td> <td>
{$COMPANY} {$COMPANY}
@@ -79,11 +91,11 @@
{module_include location='customer_list_row'} {module_include location='customer_list_row'}
<td> <td>
{format_date date=$LASTORDER_DATE} {$lastOrderDate}
</td> </td>
<td> <td>
{format_number number=$LASTORDER_AMOUNT} {$lastOrderCurrency} {$lastOrderAmount}
</td> </td>
<td> <td>
<div class="btn-group"> <div class="btn-group">

View File

@@ -11,7 +11,7 @@
<ul class="breadcrumb"> <ul class="breadcrumb">
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li> <li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='/admin/orders'}">{intl l="Orders"}</a></li> <li><a href="{url path='/admin/order'}">{intl l="Orders"}</a></li>
</ul> </ul>
<div class="row"> <div class="row">
@@ -19,323 +19,332 @@
<div class="general-block-decorator"> <div class="general-block-decorator">
<ul class="nav nav-tabs"> {ifloop rel='the-order'}
<li class="active"><a href="#cart" data-toggle="tab"><span class="glyphicon glyphicon-shopping-cart"></span> {intl l="Cart"}</a></li>
<li><a href="#bill" data-toggle="tab"><span class="glyphicon glyphicon-list-alt"></span> {intl l="Bill"}</a></li>
<li><a href="#carriage" data-toggle="tab"><span class="glyphicon glyphicon-send"></span> {intl l="Carriage"}</a></li>
<li><a href="#settlement" data-toggle="tab"><span class="glyphicon glyphicon-credit-card"></span> {intl l="Settlement"}</a></li>
<li><a href="#address" data-toggle="tab"><span class="glyphicon glyphicon-home"></span> {intl l="Address"}</a></li>
<li><a href="#supplements" data-toggle="tab"><span class="glyphicon glyphicon-info-sign"></span> {intl l="Further information"}</a></li>
</ul>
<div class="tab-content"> {loop type="order" name="the-order" id=$order_id customer="*"}
<div class="tab-pane fade active in" id="cart">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Information about order 01201303540354'}
</caption>
<thead>
<tr>
<th>{intl l="Designation"}</th>
<th>{intl l="Price"}</th>
<th>{intl l="Quantity"}</th>
<th>{intl l="Total"}</th>
</tr>
</thead>
<tbody> {loop type="currency" name="order-currency" id=$CURRENCY}
<tr> {assign "orderCurrency" $SYMBOL}
<td><a href="#">T-Shirt F T1</a></td> {/loop}
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
</tbody>
<tfoot>
<tr class="active">
<td colspan="3"><strong>Total</strong></td>
<td><strong>180.00 &euro;</strong></td>
</tr>
</tfoot>
</table>
</div>
</div> <!-- #cart -->
<div class="tab-pane fade" id="bill"> <ul class="nav nav-tabs">
<div class="table-responsive"> <li class="active"><a href="#cart" data-toggle="tab"><span class="glyphicon glyphicon-shopping-cart"></span> {intl l="Ordered products"}</a></li>
<table class="table table-striped table-condensed table-left-aligned"> <li><a href="#bill" data-toggle="tab"><span class="glyphicon glyphicon-list-alt"></span> {intl l="Invoice and Delivery"}</a></li>
<caption> <li><a href="#supplements" data-toggle="tab"><span class="glyphicon glyphicon-info-sign"></span> {intl l="Further information"}</a></li>
{intl l='Information about the bill'} </ul>
</caption>
<thead>
<tr>
<th>{intl l="Bill n°"}</th>
<th>{intl l="Compagny"}</th>
<th>{intl l="Firstname & Lastname"}</th>
<th>{intl l="Date & Hour"}</th>
</tr>
</thead>
<tbody> <div class="tab-content">
<tr> <div class="tab-pane fade active in" id="cart">
<td><a href="#">0001</a></td> <div class="table-responsive">
<td>Thelia</td> <table class="table table-striped table-condensed table-left-aligned">
<td>Dupont Jean</td> <caption class="clearfix">
<td>11/01/2013 14:11:00</td> {intl l='Cart'}
</tr> </caption>
</tbody> <thead>
</table> <tr>
</div> <th>{intl l="Product"}</th>
</div> <!-- #bill --> <th>{intl l="Price"}</th>
<th>{intl l="Quantity"}</th>
<th>{intl l="Total"}</th>
</tr>
</thead>
<div class="tab-pane fade" id="carriage"> <tbody>
<p class="title title-without-tabs clearfix"> <tr>
{intl l='Information about the carriage'} <td><a href="#">T-Shirt F T1</a></td>
<a class="btn btn-default btn-primary pull-right" title="{intl l='Download pdf bill'}" href="#"> <td>20.00 &euro;</td>
<span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download pdf bill'} <td>3</td>
</a> <td>60.00 &euro;</td>
</p> </tr>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
</tbody>
<tfoot>
<tr class="active">
<td colspan="3"><strong>Total</strong></td>
<td><strong>180.00 &euro;</strong></td>
</tr>
</tfoot>
</table>
</div>
<dl class="dl-horizontal"> <div class="table-responsive">
<dt>{intl l="Mode of transportation"}</dt> <table class="table table-striped table-condensed table-left-aligned">
<dd>Colissimo</dd> <caption class="clearfix">
</dl> {intl l='Payment information'}
<dl class="dl-horizontal"> </caption>
<dt>{intl l="Description"}</dt> <tbody>
<dd>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ut, error, necessitatibus ipsam dolores ad quisquam provident sed repudiandae ullam quasi quae perferendis numquam voluptates doloribus laborum possimus dicta similique in?</dd> <tr>
</dl> <th>{intl l="Payment module"}</th>
</div> <!-- #carriage --> <td>{loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}</td>
</tr>
<tr>
<th>{intl l="Transaction reference"}</th>
<td>{$TRANSACTION_REF}</td>
</tr>
<tr>
<th>{intl l="Total without discount"}</th>
<td>@TODO</td>
</tr>
<tr>
<th>{intl l="Discount"}</th>
<td>@TODO</td>
</tr>
<tr>
<th>{intl l="Coupon code"}</th>
<td>@TODO</td>
</tr>
<tr>
<th>{intl l="Total including discount"}</th>
<td>{$orderCurrency} {$TOTAL_TAXED_AMOUNT-$POSTAGE}</td>
</tr>
<tr>
<th>{intl l="Postage"}</th>
<td>{$orderCurrency} {$POSTAGE}</td>
</tr>
<tr>
<th>{intl l="Total"}</th>
<td>{$orderCurrency} {$TOTAL_TAXED_AMOUNT}</td>
</tr>
</tbody>
</table>
</div>
<div class="tab-pane fade" id="settlement"> </div> <!-- #cart -->
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Information about the settlement'}
</caption>
<tbody>
<tr>
<th>{intl l="Type of payment"}</th>
<td>Unknown</td>
</tr>
<tr>
<th>{intl l="Transaction reference"}</th>
<td>141100</td>
</tr>
<tr>
<th>{intl l="Total order before discount"}</th>
<td>60 &euro;</td>
</tr>
<tr>
<th>{intl l="Discount"}</th>
<td>10%</td>
</tr>
<tr>
<th>{intl l="Coupon code"}</th>
<td></td>
</tr>
<tr>
<th>{intl l="Total with discount"}</th>
<td>50 &euro;</td>
</tr>
<tr>
<th>{intl l="Freight"}</th>
<td>6 &euro;</td>
</tr>
<tr>
<th>{intl l="Total"}</th>
<td>56 &euro;</td>
</tr>
</tbody>
</table>
</div>
</div> <!-- #settlement -->
<div class="tab-pane fade clearfix" id="address"> <div class="tab-pane fade clearfix" id="bill">
<div class="col-md-6"> <p class="title title-without-tabs">
<div class="table-responsive"> {intl l='Delivery module'}
<table class="table table-striped table-condensed table-left-aligned"> </p>
<caption class="clearfix">
{intl l='Billing address'}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Edit this billing address'}" href="#edit_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
</caption>
<tbody>
<tr>
<th>{intl l="Title"}</th>
<td>Mr</td>
</tr>
<tr>
<th>{intl l="Compagny"}</th>
<td>Thelia</td>
</tr>
<tr>
<th>{intl l="Firstname"}</th>
<td>Espeche</td>
</tr>
<tr>
<th>{intl l="Lastname"}</th>
<td>Michaël</td>
</tr>
<tr>
<th>{intl l="Street address"}</th>
<td>5, rue Rochon</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit amet</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit</td>
</tr>
<tr>
<th>{intl l="Zip code"}</th>
<td>63000</td>
</tr>
<tr>
<th>{intl l="City"}</th>
<td>Clermont-Fd</td>
</tr>
<tr>
<th>{intl l="Country"}</th>
<td>France</td>
</tr>
<tr>
<th>{intl l="Phone"}</th>
<td>01 02 03 04 05</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-md-6"> {loop name="payment-module" type="module" id=$DELIVERY_MODULE}
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Delivery address'}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Edit this delivery address'}" href="#edit_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
</caption>
<tbody>
<tr>
<th>{intl l="Title"}</th>
<td>Mr</td>
</tr>
<tr>
<th>{intl l="Compagny"}</th>
<td>Thelia</td>
</tr>
<tr>
<th>{intl l="Firstname"}</th>
<td>Espeche</td>
</tr>
<tr>
<th>{intl l="Lastname"}</th>
<td>Michaël</td>
</tr>
<tr>
<th>{intl l="Street address"}</th>
<td>5, rue Rochon</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit amet</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit</td>
</tr>
<tr>
<th>{intl l="Zip code"}</th>
<td>63000</td>
</tr>
<tr>
<th>{intl l="City"}</th>
<td>Clermont-Fd</td>
</tr>
<tr>
<th>{intl l="Country"}</th>
<td>France</td>
</tr>
<tr>
<th>{intl l="Phone"}</th>
<td>01 02 03 04 05</td>
</tr>
</tbody>
</table>
</div>
</div>
</div> <!-- #address --> <dl class="dl-horizontal">
<dt>{intl l="Name"}</dt>
<dd>{$TITLE}</dd>
</dl>
<dl class="dl-horizontal">
<dt>{intl l="Description"}</dt>
<dd>{$DESCRIPTION}</dd>
</dl>
<div class="tab-pane fade clearfix" id="supplements"> {/loop}
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Further information'}
</caption>
<tbody> <div class="col-md-6">
<tr> <div class="table-responsive">
<th><label for="">{intl l='Status'}</label></th> <table class="table table-striped table-condensed table-left-aligned">
<td> <caption class="clearfix">
<form action="" method=""> {intl l='Invoice informations'}
<div class="row"> <div class="pull-right">
<div class="col-lg-4"> <a class="btn btn-default btn-primary" title="{intl l='Download invoice as PDF'}" href="#">
<select name="" id="" class="form-control"> <span class="glyphicon glyphicon-cloud-download"></span> {intl l='PDF invoice'}
<option value="">Status 1</option> </a>
<option value="">Status 2</option> <a class="btn btn-default btn-primary" title="{intl l='Edit invoice address'}" href="#edit_address_dialog" data-toggle="modal">
<option value="">Status 3</option> <span class="glyphicon glyphicon-edit"></span>
</select> </a>
</div> </div>
</div> </caption>
</form> <tbody>
</td> <tr>
</tr> <th>{intl l="Invoice reference"}</th>
<tr> <td>{$INVOICE_REF}</td>
<th><label for="">{intl l='Order Tracking'}</label></th> </tr>
<td> <tr>
<form action="" method=""> <th>{intl l="Invoice date"}</th>
<div class="row"> <td>{format_date date=$INVOICE_DATE output="date"}</td>
<div class="col-lg-4"> </tr>
<input type="text" id="" name="" class="form-control" value="" title="" placeholder="">
</div>
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span></button>
</div>
</form>
</td>
</tr>
<tr>
<th>{intl l='Bill'}</th>
<td><a href="#" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download bill to pdf'}</a></td>
</tr>
<tr>
<th>{intl l='Delivery'}</th>
<td><a href="#" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download delivery to pdf'}</a></td>
</tr>
</tbody>
</table>
</div>
</div> <!-- #supplements -->
</div> {loop type="order_address" name="order-invoice-address" id=$INVOICE_ADDRESS}
<tr>
<th>{intl l="Title"}</th>
<td>{loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop}</td>
</tr>
<tr>
<th>{intl l="Compagny"}</th>
<td>{$COMPANY}</td>
</tr>
<tr>
<th>{intl l="Firstname"}</th>
<td>{$FIRSTNAME}</td>
</tr>
<tr>
<th>{intl l="Lastname"}</th>
<td>{$LASTNAME}</td>
</tr>
<tr>
<th>{intl l="Street address"}</th>
<td>{$ADDRESS1}</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>{$ADDRESS2}</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>{$ADDRESS3}</td>
</tr>
<tr>
<th>{intl l="Zip code"}</th>
<td>{$ZIPCODE}</td>
</tr>
<tr>
<th>{intl l="City"}</th>
<td>{$CITY}</td>
</tr>
<tr>
<th>{intl l="Country"}</th>
<td>{loop type="country" name="order-invoice-address-country" id=$COUNTRY}{$TITLE}{/loop}</td>
</tr>
<tr>
<th>{intl l="Phone"}</th>
<td>{$PHONE}</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Delivery address'}
<div class="pull-right">
<a class="btn btn-default btn-primary" title="{intl l='Download purchase order as PDF'}" href="#">
<span class="glyphicon glyphicon-cloud-download"></span> {intl l='PDF purchase order'}
</a>
<a class="btn btn-default btn-primary" title="{intl l='Edit delivery address'}" href="#edit_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
</div>
</caption>
<tbody>
{loop type="order_address" name="order-delivery-address" id=$DELIVERY_ADDRESS}
<tr>
<th>{intl l="Title"}</th>
<td>{loop type="title" name="order-delivery-address-title" id=$TITLE}{$LONG}{/loop}</td>
</tr>
<tr>
<th>{intl l="Compagny"}</th>
<td>{$COMPANY}</td>
</tr>
<tr>
<th>{intl l="Firstname"}</th>
<td>{$FIRSTNAME}</td>
</tr>
<tr>
<th>{intl l="Lastname"}</th>
<td>{$LASTNAME}</td>
</tr>
<tr>
<th>{intl l="Street address"}</th>
<td>{$ADDRESS1}</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>{$ADDRESS2}</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>{$ADDRESS3}</td>
</tr>
<tr>
<th>{intl l="Zip code"}</th>
<td>{$ZIPCODE}</td>
</tr>
<tr>
<th>{intl l="City"}</th>
<td>{$CITY}</td>
</tr>
<tr>
<th>{intl l="Country"}</th>
<td>{loop type="country" name="order-delivery-address-country" id=$COUNTRY}{$TITLE}{/loop}</td>
</tr>
<tr>
<th>{intl l="Phone"}</th>
<td>{$PHONE}</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</div>
</div> <!-- #bill -->
<div class="tab-pane fade clearfix" id="supplements">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Further information'}
</caption>
<tbody>
<tr>
<th><label for="">{intl l='Status'}</label></th>
<td>
<form action="" method="">
<div class="row">
<div class="col-lg-4">
<select name="" id="" class="form-control">
<option value="">Status 1</option>
<option value="">Status 2</option>
<option value="">Status 3</option>
</select>
</div>
</div>
</form>
</td>
</tr>
<tr>
<th><label for="">{intl l='Order Tracking'}</label></th>
<td>
<form action="" method="">
<div class="row">
<div class="col-lg-4">
<input type="text" id="" name="" class="form-control" value="" title="" placeholder="">
</div>
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span></button>
</div>
</form>
</td>
</tr>
<tr>
<th>{intl l='Bill'}</th>
<td><a href="#" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download bill to pdf'}</a></td>
</tr>
<tr>
<th>{intl l='Delivery'}</th>
<td><a href="#" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download delivery to pdf'}</a></td>
</tr>
</tbody>
</table>
</div>
</div> <!-- #supplements -->
</div>
{/loop}
{/ifloop}
{elseloop rel="the-order"}
DOES NOT EXISTS
{/elseloop}
</div> </div>

View File

@@ -45,22 +45,47 @@
</thead> </thead>
<tbody> <tbody>
{loop type="order" name="order-list" customer="*"} {loop type="order" name="order-list" customer="*"}
{loop type="customer" name="order-customer"} {loop type="order_address" name="order-invoice-address" id=$INVOICE_ADDRESS}
{assign "orderInvoiceFirstName" $FIRSTNAME}
{assign "orderInvoiceLastName" $LASTNAME}
{assign "orderInvoiceCompany" $COMPANY}
{/loop} {/loop}
{loop type="order_address" name="order-invoice-address"} {loop type="order-status" name="order-status" id=$STATUS}
{assign "orderStatus" $TITLE}
{if $CODE == 'not_paid'}
{assign "orderStatusLabel" "warning"}
{else}
{if $CODE == 'paid'}
{assign "orderStatusLabel" "success"}
{else}
{if $CODE == 'processing'}
{assign "orderStatusLabel" "Primary"}
{else}
{if $CODE == 'sent'}
{assign "orderStatusLabel" "info"}
{else}
{if $CODE == 'canceled'}
{assign "orderStatusLabel" "danger"}
{else}
{/if}
{/if}
{/if}
{/if}
{/if}
{/loop} {/loop}
<tr> <tr>
<td><a href="">{$REF}</a></td> <td><a href="{url path="/admin/order/update/$ID"}">01230450123045</a></td>
<td>{format_date date=$CREATE_DATE}</td> <td>{format_date date=$CREATE_DATE}</td>
<td>Thelia</td> <td>{$orderInvoiceCompany}</td>
<td><a href="">Dupont</a></td> <td><a href="{url path="/admin/customer/update/$CUSTOMER"}">{$orderInvoiceFirstName|ucwords} {$orderInvoiceLastName|upper}</a></td>
<td>251 &euro;</td> <td>{$TOTAL_TAXED_AMOUNT}</td>
<td><span class="label label-success">Paid</span></td> <td><span class="label label-{$orderStatusLabel}">{$orderStatus}</span></td>
{module_include location='orders_table_row'} {module_include location='orders_table_row'}