|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- <?php
-
-
-
- use common\helpers\GlobalParam;
- use domain\Order\Order\Order;
- use domain\Order\Order\OrderModule;
- use domain\PointSale\PointSale\PointSaleModule;
- use domain\Producer\Producer\ProducerModule;
- use yii\helpers\Html;
-
- $producerModule = ProducerModule::getInstance();
- $orderModule = OrderModule::getInstance();
- $pointSaleModule = PointSaleModule::getInstance();
- $producer = GlobalParam::getCurrentProducer() ;
-
- $this->setTitle('Confirmation de commande') ;
-
- ?>
-
- <div id="order-success">
- <?php if($producerModule->isOnlinePaymentActiveAndTypeOrder($producer) && $returnPayment != 'success'): ?>
- <div class="alert alert-danger">
- <h5>Le paiement en ligne a échoué.</h5>
- <strong>Attention</strong>, votre commande ne sera effective qu'à la réception du paiement.<br />
- <a href="<?= $order->online_payment_url ?>">Cliquez ici</a> pour recommencer votre paiement.
- </div>
- <?php else: ?>
- <div class="alert alert-success">
- <h4 class="alert-heading">
- <i class="bi bi-check2-square"></i>
- Votre commande a bien été prise en compte
- </h4>
- <?php if(!Yii::$app->user->isGuest): ?>
- <p>
- <a href="<?= \Yii::$app->urlManagerProducer->createUrl(['order/history']) ?>">
- Voir mes commandes
- </a>
- </p>
- <?php endif; ?>
- </div>
- <?php endif; ?>
-
- <div class="alert alert-info alert-order-summary">
- <h4 class="alert-heading">
- <i class="bi bi-list-check"></i>
- Récapitulatif
- </h4>
- <div class="row">
- <div class="col-md-6">
- <ul>
- <?php if($order->reference && strlen($order->reference) > 0): ?><li><span class="glyphicon glyphicon-check"></span> Commande N°<strong><?= Html::encode($order->reference); ?></strong></li><?php endif; ?>
- <li><i class="bi bi-clock"></i> Le <?= date('d/m/Y',strtotime($order->distribution->date)) ?></li>
- <li><i class="bi bi-geo-alt"></i>
- <?php if($order->delivery_home): ?>
- Livraison à domicile
- <br /><span class="locality"><?= nl2br(Html::encode($order->delivery_address)); ?></span>
- <?php else: ?>
- <?= Html::encode($order->pointSale->name) ?><?php if(strlen($order->pointSale->name)): ?>
- <?php if($order->pointSale->is_bread_box && $order->pointSale->bread_box_code): ?>
- (Code : <strong><?= $order->pointSale->bread_box_code; ?></strong>)
- <?php endif; ?>
- <span class="locality">à <?= $pointSaleModule->getSolver()->getLocalityWithAddressTooltip($order->pointSale) ?></span>
- <?php endif; ?>
-
- <?php endif; ?>
- </li>
- <?php
- $strInfos = '';
- if($order->pointSale) {
- $strInfos = $pointSaleModule->getStrInfos($order->pointSale, strtolower(date('l',strtotime($order->distribution->date))));
- }
- ?>
- <?php if(strlen($strInfos) > 0): ?>
- <li>
- <i class="bi bi-info-circle"></i>
- <span class="infos"><?= $strInfos ?></span>
- </li>
- <?php endif; ?>
- </ul>
- </div>
- <div class="col-md-6">
- <p>
- <i class="bi bi-list-ul"></i>
- Produits
- </p>
- <div class="summary">
- <?= $orderModule->getCartSummary($order) ?>
- </div>
- <p>
- <i class="bi bi-arrow-return-right"></i>
- <strong><?= $orderModule->getOrderAmountWithTax($order,Order::AMOUNT_TOTAL, true); ?></strong>
- </p>
- </div>
- </div>
- </div>
-
- <?= $this->render('_block_infos'); ?>
- </div>
|