You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
139 lines
3.3 KiB
139 lines
3.3 KiB
::use 'design.mtt'::
|
|
<div id="content" class="col-md-8">
|
|
<div class="article">
|
|
<h2>::_("Order"):: ::c.name::</h2>
|
|
|
|
::if distribution!=null::
|
|
::_("For the delivery of the"):: <b>::hDate(distribution.date)::</b>
|
|
::end::
|
|
|
|
<p>
|
|
::raw _("As long as orders are open, you can come back on this page and modify your order.<br/>You can check any time your current orders on the following page <a href='/contract'>my account</a>.")::
|
|
</p>
|
|
|
|
<form name="order" id="order" method="POST" action="">
|
|
<input type="hidden" name="token" value="::token::"/>
|
|
|
|
::if distribution!=null::
|
|
<input type="hidden" name="distribution" value="::distribution.id::"/>
|
|
::end::
|
|
<table class="table table-bordered">
|
|
<tr>
|
|
<td></td>
|
|
<th>::_("Product")::</th>
|
|
<th>::_("Price")::</th>
|
|
::foreach d userOrders::
|
|
::if d.distrib==null::
|
|
<th>::_("Qty")::</th>
|
|
::else::
|
|
<th>::dDate(d.distrib.date)::</th>
|
|
::end::
|
|
::end::
|
|
</tr>
|
|
|
|
|
|
|
|
::if userOrders.length>0::
|
|
|
|
::foreach uo userOrders[0].datas::
|
|
<tr>
|
|
<td>
|
|
<img src="::uo.product.getImage()::" style="width:32px;height:32px;" />
|
|
</td>
|
|
<td>
|
|
<span ::cond uo.product.organic:: title ="Agriculture biologique" data-toggle="tooltip" data-placement="bottom">
|
|
<img src="/img/AB.png"/>
|
|
</span>
|
|
<a href="#" onclick="_.overlay('/shop/productInfo/::uo.product.id::','::escapeJS(uo.product.getName())::')">
|
|
::uo.product.getName()::
|
|
</a>
|
|
</td>
|
|
<td>
|
|
::set price = uo.product.price + uo.product._contract.computeFees(uo.product.price)::
|
|
::formatNum(price):: ::currency()::
|
|
</td>
|
|
|
|
|
|
::set i = repeat.uo.index::
|
|
|
|
::foreach d userOrders::
|
|
<td>
|
|
|
|
::set o = d.datas[i]::
|
|
|
|
::if o.order==null::
|
|
::set q = ""::
|
|
::else::
|
|
::set q = o.order.quantity::
|
|
::end::
|
|
|
|
|
|
::if d.distrib==null::
|
|
<!-- contrat amap-->
|
|
<input type="text" class="form-control" name="::"d-p"+o.product.id::" id="product::o.product.id::" value="::q::" />
|
|
::else::
|
|
<input type="text" class="form-control" name="::"d"+d.distrib.id+"-p"+o.product.id::" id="product::o.product.id::" value="::q::" />
|
|
::end::
|
|
|
|
|
|
</td>
|
|
::end::
|
|
|
|
</tr>
|
|
::end::
|
|
|
|
::else::
|
|
<tr>
|
|
<td colspan="4">::_("There is currently no open order")::</td>
|
|
</tr>
|
|
::end::
|
|
|
|
<tr>
|
|
|
|
<th colspan="3" class="text-right">Total</th>
|
|
|
|
::foreach d userOrders::
|
|
<th>
|
|
|
|
::set total=0::
|
|
::foreach o d.datas::
|
|
|
|
::if o.order!=null::
|
|
::set q = o.order.quantity::
|
|
::set price = o.product.price + o.product._contract.computeFees(o.product.price)::
|
|
|
|
::set total = total+(q*price)::
|
|
|
|
::end::
|
|
|
|
::end::
|
|
|
|
::formatNum(total):: ::currency()::
|
|
</th>
|
|
|
|
|
|
::end::
|
|
</tr>
|
|
</table>
|
|
|
|
<i>::_("Tip: to remove an order please key-in the quantity 0")::</i><br/><br/>
|
|
|
|
<input type="submit" class="btn btn-primary" value="::_("Validate the order")::" name="submit" id="submit" />
|
|
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="article">
|
|
::_("Supplier:"):: <b>::c._vendor.name::</b>
|
|
<br/>
|
|
<br/>
|
|
::_("Contact in charge:"):: $$contact(::c._contact::)
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
::end::
|