<p>Votre commande d'une valeur de <strong><?= $order->getAmountWithTax(Order::AMOUNT_TOTAL, true); ?></strong> a bien été prise en compte.</p> | <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 | <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> | <strong><?= Html::encode($pointSale->name) ?></strong><?php if(strlen($pointSale->locality) > 0): ?> situé à <?= Html::encode($pointSale->locality) ?><?php endif ?>.</p> | ||||
Votre commande d'une valeur de <?= $order->getAmountWithTax(Order::AMOUNT_TOTAL, true); ?> a bien été prise en compte. | 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 ?>. | 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') ; ?> | <?php $payment_infos = Producer::getConfig('option_payment_info') ; ?> |
* | * | ||||
* @return string | * @return string | ||||
*/ | */ | ||||
public function getCartSummary() | |||||
public function getCartSummary($htmlFormat = true) | |||||
{ | { | ||||
if (!isset($this->productOrder)) { | if (!isset($this->productOrder)) { | ||||
$this->productOrder = productOrder::find()->where(['id_order' => $this->id])->all(); | $this->productOrder = productOrder::find()->where(['id_order' => $this->id])->all(); | ||||
if (isset($p->product)) { | if (isset($p->product)) { | ||||
$html .= Html::encode($p->product->name) . ' (' . $p->quantity . ' ' . Product::strUnit($p->unit, 'wording_short', true) . ')'; | $html .= Html::encode($p->product->name) . ' (' . $p->quantity . ' ' . Product::strUnit($p->unit, 'wording_short', true) . ')'; | ||||
if (++$i != $count) { | if (++$i != $count) { | ||||
$html .= '<br />'; | |||||
if($htmlFormat) { | |||||
$html .= '<br />'; | |||||
} | |||||
else { | |||||
$html .= "\n"; | |||||
} | |||||
} | } | ||||
} | } | ||||
} | } | ||||
{ | { | ||||
$count = 0; | $count = 0; | ||||
if ($this->productOrder && is_array($this->productOrder)) { | 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; | |||||
} | } | ||||
/** | /** |
</div> | </div> | ||||
<div class="clr"></div> | <div class="clr"></div> | ||||
</div> | </div> | ||||
<div class="alert alert-info"> | |||||
<div class="alert alert-info alert-order-summary"> | |||||
<span class="glyphicon glyphicon-list-alt glyphicon-big"></span> | <span class="glyphicon glyphicon-list-alt glyphicon-big"></span> | ||||
<div class="content"> | <div class="content"> | ||||
<h3>Récapitulatif de votre commande</h3> | <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> | ||||
<div class="clr"></div> | <div class="clr"></div> | ||||
</div> | </div> |
.order-confirm #main #order-success .alert.alert-info .content .glyphicon { | .order-confirm #main #order-success .alert.alert-info .content .glyphicon { | ||||
margin-right: 5px; | 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 { | .order-confirm #main #order-success .alert { | ||||
padding: 0px; | 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 { | .order-confirm #main #order-success .alert .glyphicon-big { | ||||
font-size: 90px; | font-size: 90px; | ||||
color: white; | color: white; | ||||
padding: 30px; | padding: 30px; | ||||
float: left; | float: left; | ||||
} | } | ||||
/* line 32, ../sass/order/_confirm.scss */ | |||||
/* line 45, ../sass/order/_confirm.scss */ | |||||
.order-confirm #main #order-success .alert div.content { | .order-confirm #main #order-success .alert div.content { | ||||
color: #333; | color: #333; | ||||
padding: 20px; | padding: 20px; | ||||
margin-left: 151px; | margin-left: 151px; | ||||
} | } | ||||
/* line 37, ../sass/order/_confirm.scss */ | |||||
/* line 50, ../sass/order/_confirm.scss */ | |||||
.order-confirm #main #order-success .alert div.content h3 { | .order-confirm #main #order-success .alert div.content h3 { | ||||
font-family: "capsuularegular"; | font-family: "capsuularegular"; | ||||
font-size: 30px; | font-size: 30px; | ||||
line-height: 35px; | line-height: 35px; | ||||
text-transform: none; | text-transform: none; | ||||
} | } | ||||
/* line 50, ../sass/order/_confirm.scss */ | |||||
/* line 63, ../sass/order/_confirm.scss */ | |||||
.order-confirm #main #order-success .alert div.content .locality { | .order-confirm #main #order-success .alert div.content .locality { | ||||
color: gray; | color: gray; | ||||
} | } |
} | } | ||||
} | } | ||||
.alert-order-summary { | |||||
ul { | |||||
li { | |||||
margin-bottom: 10px ; | |||||
} | |||||
} | |||||
} | |||||
.alert { | .alert { | ||||
padding: 0px ; | padding: 0px ; | ||||
strong { | |||||
font-weight: bold ; | |||||
} | |||||
.glyphicon-big { | .glyphicon-big { | ||||
font-size: 90px ; | font-size: 90px ; | ||||
color: white ; | color: white ; |