@@ -46,6 +46,9 @@ $producer = GlobalParam::getCurrentProducer() ; | |||
<p>Votre commande d'une valeur de <strong><?= $order->getAmountWithTax(Order::AMOUNT_TOTAL, true); ?></strong> a bien été prise en compte.</p> | |||
<p>Récapitulatif des produits commandés :</p> | |||
<p><?= $order->getCartSummary() ?></p> | |||
<p>Elle sera à retirer le <strong><?= date('d/m/Y',strtotime($distribution->date)) ?></strong> au point de retrait | |||
<strong><?= Html::encode($pointSale->name) ?></strong><?php if(strlen($pointSale->locality) > 0): ?> situé à <?= Html::encode($pointSale->locality) ?><?php endif ?>.</p> | |||
@@ -46,6 +46,9 @@ Bonjour <?= $user->name; ?>, | |||
Votre commande d'une valeur de <?= $order->getAmountWithTax(Order::AMOUNT_TOTAL, true); ?> a bien été prise en compte. | |||
Récapitulatif des produits commandés : | |||
<?= $order->getCartSummary(false) ?> | |||
Elle sera à retirer le <?= date('d/m/Y',strtotime($distribution->date)) ?> au point de retrait <?= $pointSale->name ?><?php if(strlen($pointSale->locality) > 0): ?> situé à <?= Html::encode($pointSale->locality) ?><?php endif ?>. | |||
<?php $payment_infos = Producer::getConfig('option_payment_info') ; ?> |
@@ -566,7 +566,7 @@ class Order extends ActiveRecordCommon | |||
* | |||
* @return string | |||
*/ | |||
public function getCartSummary() | |||
public function getCartSummary($htmlFormat = true) | |||
{ | |||
if (!isset($this->productOrder)) { | |||
$this->productOrder = productOrder::find()->where(['id_order' => $this->id])->all(); | |||
@@ -579,7 +579,12 @@ class Order extends ActiveRecordCommon | |||
if (isset($p->product)) { | |||
$html .= Html::encode($p->product->name) . ' (' . $p->quantity . ' ' . Product::strUnit($p->unit, 'wording_short', true) . ')'; | |||
if (++$i != $count) { | |||
$html .= '<br />'; | |||
if($htmlFormat) { | |||
$html .= '<br />'; | |||
} | |||
else { | |||
$html .= "\n"; | |||
} | |||
} | |||
} | |||
} | |||
@@ -914,15 +919,9 @@ class Order extends ActiveRecordCommon | |||
{ | |||
$count = 0; | |||
if ($this->productOrder && is_array($this->productOrder)) { | |||
foreach ($this->productOrder as $productOrder) { | |||
if ($productOrder->unit == 'piece') { | |||
$count++; | |||
} else { | |||
$count += $productOrder->quantity; | |||
} | |||
} | |||
return count($this->productOrder) ; | |||
} | |||
return $count; | |||
return 0; | |||
} | |||
/** |
@@ -58,16 +58,31 @@ $producer = GlobalParam::getCurrentProducer() ; | |||
</div> | |||
<div class="clr"></div> | |||
</div> | |||
<div class="alert alert-info"> | |||
<div class="alert alert-info alert-order-summary"> | |||
<span class="glyphicon glyphicon-list-alt glyphicon-big"></span> | |||
<div class="content"> | |||
<h3>Récapitulatif de votre commande</h3> | |||
<ul> | |||
<li><span class="glyphicon glyphicon-time"></span><?= date('d/m/Y',strtotime($order->distribution->date)) ?></li> | |||
<li><span class="glyphicon glyphicon-map-marker"></span><?= Html::encode($order->pointSale->name) ?><?php if(strlen($order->pointSale->name)): ?> <span class="locality">à <?= Html::encode($order->pointSale->locality) ?></span><?php endif; ?></li> | |||
<li><span class="glyphicon glyphicon-th-list"></span><?= $order->countProducts(); ?> produit<?php if($order->countProducts() > 1): ?>s<?php endif; ?></li> | |||
<li><span class="glyphicon glyphicon-chevron-right"></span><?= $order->getAmountWithTax(Order::AMOUNT_TOTAL, true); ?></li> | |||
</ul> | |||
<div class="row"> | |||
<div class="col-md-6"> | |||
<ul> | |||
<li><span class="glyphicon glyphicon-time"></span>Le <?= date('d/m/Y',strtotime($order->distribution->date)) ?></li> | |||
<li><span class="glyphicon glyphicon-map-marker"></span><?= Html::encode($order->pointSale->name) ?><?php if(strlen($order->pointSale->name)): ?> | |||
<br /> <span class="locality">à <?= Html::encode($order->pointSale->locality) ?></span><?php endif; ?></li> | |||
</ul> | |||
</div> | |||
<div class="col-md-6"> | |||
<ul> | |||
<li> | |||
<p><strong>Produit<?php if($order->countProducts() > 1): ?>s<?php endif; ?></strong></p> | |||
<p><?= $order->getCartSummary() ?></p> | |||
</li> | |||
<li>Total : <strong><?= $order->getAmountWithTax(Order::AMOUNT_TOTAL, true); ?></strong></li> | |||
</ul> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="clr"></div> | |||
</div> |
@@ -1573,24 +1573,32 @@ termes. | |||
.order-confirm #main #order-success .alert.alert-info .content .glyphicon { | |||
margin-right: 5px; | |||
} | |||
/* line 23, ../sass/order/_confirm.scss */ | |||
/* line 25, ../sass/order/_confirm.scss */ | |||
.order-confirm #main #order-success .alert-order-summary ul li { | |||
margin-bottom: 10px; | |||
} | |||
/* line 31, ../sass/order/_confirm.scss */ | |||
.order-confirm #main #order-success .alert { | |||
padding: 0px; | |||
} | |||
/* line 25, ../sass/order/_confirm.scss */ | |||
/* line 34, ../sass/order/_confirm.scss */ | |||
.order-confirm #main #order-success .alert strong { | |||
font-weight: bold; | |||
} | |||
/* line 38, ../sass/order/_confirm.scss */ | |||
.order-confirm #main #order-success .alert .glyphicon-big { | |||
font-size: 90px; | |||
color: white; | |||
padding: 30px; | |||
float: left; | |||
} | |||
/* line 32, ../sass/order/_confirm.scss */ | |||
/* line 45, ../sass/order/_confirm.scss */ | |||
.order-confirm #main #order-success .alert div.content { | |||
color: #333; | |||
padding: 20px; | |||
margin-left: 151px; | |||
} | |||
/* line 37, ../sass/order/_confirm.scss */ | |||
/* line 50, ../sass/order/_confirm.scss */ | |||
.order-confirm #main #order-success .alert div.content h3 { | |||
font-family: "capsuularegular"; | |||
font-size: 30px; | |||
@@ -1603,7 +1611,7 @@ termes. | |||
line-height: 35px; | |||
text-transform: none; | |||
} | |||
/* line 50, ../sass/order/_confirm.scss */ | |||
/* line 63, ../sass/order/_confirm.scss */ | |||
.order-confirm #main #order-success .alert div.content .locality { | |||
color: gray; | |||
} |
@@ -20,8 +20,21 @@ | |||
} | |||
} | |||
.alert-order-summary { | |||
ul { | |||
li { | |||
margin-bottom: 10px ; | |||
} | |||
} | |||
} | |||
.alert { | |||
padding: 0px ; | |||
strong { | |||
font-weight: bold ; | |||
} | |||
.glyphicon-big { | |||
font-size: 90px ; | |||
color: white ; |