Untitled
user_3891691
plain_text
2 years ago
25 kB
7
Indexable
<?php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
; ?>
<?php /** @var $block \Nipuna\OverrideMage\Block\Onepage\Success */; ?>
<style type="text/css">
.page-title-wrapper {
display: none;
}
p {
color: #6a6a6a;
font-size: 15px;
text-align: start;
}
</style>
<!-- For bank transfer payment system -->
<?php
/*
* Set Complete status to Payment Credit cards automatically.
*/
$credit_card_payments = ['mpgs_hostedcheckout', 'cimfinance'];
$payment_method = $block->getPaymentCode();
// if($payment_method == "juice"){
// $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
// $eventManager = $objectManager->create('Magento\Framework\Event\ManagerInterface');
// $order = $objectManager->create('Magento\Sales\Model\Order')->loadByIncrementId($block->getOrderId());
// $eventManager->dispatch(
// 'order_nav_to_push',
// ['order' => $order]
// );
// }
if(in_array($payment_method, $credit_card_payments)){
$orderId = $block->getOrderId();
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$orderComplete = $objectManager->create('Magento\Sales\Model\Order');
$order = $orderComplete->load($orderId);
$order->setStatus("complete");
$order->save();
}
?>
<?php if ($block->getPaymentCode() == "banktransfer") : ?>
<div class="container success-page-content">
<section class="confirmOrder order-detail">
<div class="juice-container">
<p> Thank you. Your order has been received.</p>
<div class="order-content">
<ul class="order-details">
<li class="order">
Order ID:
<?php if ($block->getOrderId()) : ?>
<?php if ($block->getCanViewOrder()) : ?>
<strong><?php echo __(sprintf('<a href="%s" class="order-number"><strong>%s</strong></a>', $block->escapeHtml($block->getViewOrderUrl()), $block->escapeHtml($block->getOrderId()))); ?></strong>
<?php else : ?>
<strong><?php echo __($block->escapeHtml($block->getOrderId())); ?></strong>
<?php endif; ?>
<?php endif; ?>
</li>
<li class="date">
Date:
<strong><?php echo ($block->getDeliverydate() == date('0000-00-00 00:00:00')) ? '-' : $block->getDeliverydate(); ?></strong>
</li>
<li class="total">
Total:
<strong>
<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$order = $objectManager->create('Magento\Sales\Model\Order')->loadByIncrementId($block->getOrderId());
$total = $order->getGrandTotal(); ?>
<span class="price-amount amount">
<span class="price-currencySymbol">₨</span> <?php echo (int)$total; ?>
</span>
</strong>
</li>
<li class="method">
Payment Mehod:
<strong><?php echo $block->getPaymentMethod(); ?></strong>
</li>
</ul>
</div>
</div>
</section>
<section class="confirmOrder order-content information">
<p>Please find below our bank details. Kindly use your Order ID as payment reference. Our customer care will
contact you as soon as payment is received.</p>
<h2>Our bank details</h2>
<h3>TheBrandHouse Ltd:</h3>
<div class="order-content">
<ul class="order-details banks_details">
<li class="bank_name">Bank: <strong>The Mauritius Commercial Bank LTD</strong></li>
<li class="account_number">Account number: <strong>000444633006</strong></li>
<li class="iban">IBAN: <strong>MU67MCBL0944000444633006000MUR</strong></li>
<li class="bic">BIC: <strong>MCBLMUMU</strong></li>
</ul>
</div>
</section>
<section class="confirmOrder order-info">
<h2> Order Details</h2>
<div class="order-content">
<?php echo $block->getAdditionalInfoHtml(); ?>
<table class="table table-sm table-responsive" id="order-success-table">
<thead>
<tr>
<th scope="col"><?= $block->escapeHtml(__('Product Name')); ?></th>
<th scope="col"><?= $block->escapeHtml(__('SKU')); ?></th>
<th scope="col"><?= $block->escapeHtml(__('Price')); ?></th>
<th scope="col"><?= $block->escapeHtml(__('Qty')); ?></th>
<th scope="col"><?= $block->escapeHtml(__('Subtotal')); ?></th>
</tr>
</thead>
<tbody>
<?php $items = $block->getItems();
foreach ($items as $item) : ?>
<tr>
<td><?php echo $item->getName(); ?></td>
<td><?php echo $item->getSku(); ?></td>
<td>Rs <?php echo $item->getPrice(); ?></td>
<td><?php echo floatval($item->getQtyOrdered()); ?></td>
<td>Rs <?php echo floatval((int)$item->getPrice() * (int)$item->getQtyOrdered()); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
<tfoot>
<?php echo $this->getLayout()->createBlock("Nipuna\Mage\Block\Order\Totals")->setTemplate("Nipuna_Mage::checkout/totals.phtml")->toHtml(); ?>
</tfoot>
</table>
</div>
</section>
<section class="confirmOrder customer-detail">
<h2>Customer Details</h2>
<table class="table">
<tbody>
<tr>
<th>Email:</th>
<td><?php echo $block->getOrder()->getCustomerEmail() ?></td>
</tr>
<tr>
<th>Telephone:</th>
<td><?php echo $block->getCustomer()->getCustomAttribute('nav_customer_mobile_no')->getValue()
?>
</td>
</tr>
</tbody>
</table>
</section>
<section class="confirmOrder row addresses">
<div class="col-md-6 billing-address">
<div class="address-title">
<h3>Billing Address</h3>
<hr>
</div>
<div class="billing-address responsive_address">
<?php if (!empty($block->getOrder()->getBillingAddress()->getStreetLine(1))) : ?>
<?php echo $block->getOrder()->getBillingAddress()->getStreetLine(1); ?>
<br>
<?php endif; ?>
<?php if (!empty($block->getOrder()->getBillingAddress()->getStreetLine(2))) : ?>
<?php echo $block->getOrder()->getBillingAddress()->getStreetLine(2); ?> <br>
<?php endif; ?>
<?php if (!empty($block->getOrder()->getBillingAddress()->getCity())) : ?>
<?php echo $block->getOrder()->getBillingAddress()->getCity(); ?>
<?php endif; ?>
</div>
</div>
<div class="col-md-6 shipping-address">
<div class="address-title">
<h3>Shipping Address</h3>
<hr>
</div>
<div class=" shipping-address responsive_address">
<?php if (!empty($block->getOrder()->getBillingAddress()->getStreetLine(1))) : ?>
<?php echo $block->getOrder()->getShippingAddress()->getStreetLine(1); ?>
<br>
<?php endif; ?>
<?php if (!empty($block->getOrder()->getBillingAddress()->getStreetLine(1))) : ?>
<?php echo $block->getOrder()->getShippingAddress()->getStreetLine(2); ?>
<br>
<?php endif; ?>
<?php if (!empty($block->getOrder()->getBillingAddress()->getStreetLine(1))) : ?>
<?php echo $block->getOrder()->getShippingAddress()->getCity(); ?>
<?php endif; ?>
</div>
</div>
</section>
<br>
<hr>
<div class="actions-toolbar">
<div class="primary">
<a class="action primary continue" href="<?php /* @escapeNotVerified */ echo $block->getUrl(); ?>"><span><?php /* @escapeNotVerified */ echo __('Continue Shopping'); ?></span></a>
</div>
</div>
</div>
<!-- For juice by MCB payment system -->
<?php elseif ($block->getPaymentCode() == "juice") : ?>
<div class="container success-page-content">
<section class="confirmOrder order-detail">
<div class="juice-container">
<p> Thank you. Your order has been received.</p>
<div class="order-content">
<ul class="order-details">
<li class="order">
Order ID:
<?php if ($block->getOrderId()) : ?>
<?php if ($block->getCanViewOrder()) : ?>
<strong><?php echo __(sprintf('<a href="%s" class="order-number"><strong>%s</strong></a>', $block->escapeHtml($block->getViewOrderUrl()), $block->escapeHtml($block->getOrderId()))); ?></strong>
<?php else : ?>
<strong><?php echo __($block->escapeHtml($block->getOrderId())); ?></strong>
<?php endif; ?>
<?php endif; ?>
</li>
<li class="date">
Date:
<strong><?php echo ($block->getDeliverydate() == date('0000-00-00 00:00:00')) ? '-' : $block->getDeliverydate(); ?></strong>
</li>
<li class="total">
Total:
<strong>
<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$order = $objectManager->create('Magento\Sales\Model\Order')->loadByIncrementId($block->getOrderId());
$total = $order->getGrandTotal(); ?>
<span class="price-amount amount">
<span class="price-currencySymbol">₨</span> <?php echo (int)$total; ?>
</span>
</strong>
</li>
<li class="method">
Payment Mehod:
<strong><?php echo $block->getPaymentMethod(); ?></strong>
</li>
</ul>
</div>
</div>
</section>
<section class="confirmOrder order-content information">
<p>Kindly insert your Order ID, as received by mail as description (compulsory).</p>
<p>1. Open Juice Application</p>
<p>2. Select Pay & Transfer</p>
<p>3. Select Pay a juice Merchant</p>
<p>4. Search Galaxy (Phone Number is 54981960)</p>
<p>5. Enter the order amount</p>
<p>6. Your Order ID as description</p>
<p>7. Proceed to payment</p>
<p>Our customer care will contact you as soon as payment is received.</p>
<div class="qr-image">
<img src="/media/wysiwyg/juice-payment.png" alt="QR Code" class="juice-image">
</img>
</div>
</section>
<section class="confirmOrder order-info">
<h2> Order Details</h2>
<div class="order-content">
<?php echo $block->getAdditionalInfoHtml(); ?>
<table class="table table-sm table-responsive" id="order-success-table">
<thead>
<tr>
<th scope="col"><?= $block->escapeHtml(__('Product Name')); ?></th>
<th scope="col"><?= $block->escapeHtml(__('SKU')); ?></th>
<th scope="col"><?= $block->escapeHtml(__('Price')); ?></th>
<th scope="col"><?= $block->escapeHtml(__('Qty')); ?></th>
<th scope="col"><?= $block->escapeHtml(__('Subtotal')); ?></th>
</tr>
</thead>
<tbody>
<?php $items = $block->getItems();
foreach ($items as $item) : ?>
<tr>
<td><?php echo $item->getName(); ?></td>
<td><?php echo $item->getSku(); ?></td>
<td>Rs <?php echo $item->getPrice(); ?></td>
<td><?php echo floatval($item->getQtyOrdered()); ?></td>
<td>Rs <?php echo floatval((int)$item->getPrice() * (int)$item->getQtyOrdered()); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
<tfoot>
<?php echo $this->getLayout()->createBlock("Nipuna\Mage\Block\Order\Totals")->setTemplate("Nipuna_Mage::checkout/totals.phtml")->toHtml(); ?>
</tfoot>
</table>
</div>
</section>
<section class="confirmOrder customer-detail">
<h2>Customer Details</h2>
<table class="table">
<tbody>
<tr>
<th>Email:</th>
<td><?php echo $block->getOrder()->getCustomerEmail() ?></td>
</tr>
<tr>
<th>Telephone:</th>
<td><?php echo $block->getCustomer()->getCustomAttribute('nav_customer_mobile_no')->getValue()
?>
</td>
</tr>
</tbody>
</table>
</section>
<section class="confirmOrder row addresses">
<div class="col-md-6 billing-address">
<div class="address-title">
<h3>Billing Address</h3>
<hr>
</div>
<div class="billing-address responsive_address">
<?php if (!empty($block->getOrder()->getBillingAddress()->getStreetLine(1))) : ?>
<?php echo $block->getOrder()->getBillingAddress()->getStreetLine(1); ?>
<br>
<?php endif; ?>
<?php if (!empty($block->getOrder()->getBillingAddress()->getStreetLine(2))) : ?>
<?php echo $block->getOrder()->getBillingAddress()->getStreetLine(2); ?> <br>
<?php endif; ?>
<?php if (!empty($block->getOrder()->getBillingAddress()->getCity())) : ?>
<?php echo $block->getOrder()->getBillingAddress()->getCity(); ?>
<?php endif; ?>
</div>
</div>
<div class="col-md-6 shipping-address">
<div class="address-title">
<h3>Shipping Address</h3>
<hr>
</div>
<div class=" shipping-address responsive_address">
<?php if (!empty($block->getOrder()->getBillingAddress()->getStreetLine(1))) : ?>
<?php echo $block->getOrder()->getShippingAddress()->getStreetLine(1); ?>
<br>
<?php endif; ?>
<?php if (!empty($block->getOrder()->getBillingAddress()->getStreetLine(1))) : ?>
<?php echo $block->getOrder()->getShippingAddress()->getStreetLine(2); ?>
<br>
<?php endif; ?>
<?php if (!empty($block->getOrder()->getBillingAddress()->getStreetLine(1))) : ?>
<?php echo $block->getOrder()->getShippingAddress()->getCity(); ?>
<?php endif; ?>
</div>
</div>
</section>
<br>
<hr>
<div class="actions-toolbar">
<div class="primary">
<a class="action primary continue" href="<?php /* @escapeNotVerified */ echo $block->getUrl(); ?>"><span><?php /* @escapeNotVerified */ echo __('Continue Shopping'); ?></span></a>
</div>
</div>
</div>
<!-- For other payment system -->
<?php else : ?> <div class="container success-page-content">
<section class="confirmOrder order-detail">
<div class="juice-container">
<p> Thank you. Your order has been received.</p>
<div class="order-content">
<ul class="order-details">
<li class="order">
Order ID:
<?php if ($block->getOrderId()) : ?>
<?php if ($block->getCanViewOrder()) : ?>
<strong><?php echo __(sprintf('<a href="%s" class="order-number"><strong>%s</strong></a>', $block->escapeHtml($block->getViewOrderUrl()), $block->escapeHtml($block->getOrderId()))); ?></strong>
<?php else : ?>
<strong><?php echo __($block->escapeHtml($block->getOrderId())); ?></strong>
<?php endif; ?>
<?php endif; ?>
</li>
<li class="date">
Date:
<strong><?php echo !empty($block->getDeliverydate()) ? $block->getDeliverydate() : 'N/A'; ?></strong>
</li>
<li class="total">
Total:
<strong>
<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$order = $objectManager->create('Magento\Sales\Model\Order')->loadByIncrementId($block->getOrderId());
$total = $order->getGrandTotal(); ?>
<span class="price-amount amount">
<span class="price-currencySymbol">₨</span> <?php echo (int)$total; ?>
</span>
</strong>
</li>
<li class="method">
Payment Mehod:
<strong><?php echo $block->getPaymentMethod(); ?></strong>
</li>
</ul>
</div>
</div>
</section>
<section class="confirmOrder order-info">
<h2> Order Details</h2>
<div class="order-content">
<?php echo $block->getAdditionalInfoHtml(); ?>
<table class="table table-sm table-responsive" id="order-success-table">
<thead>
<tr>
<th scope="col"><?= $block->escapeHtml(__('Product Name')); ?></th>
<th scope="col"><?= $block->escapeHtml(__('SKU')); ?></th>
<th scope="col"><?= $block->escapeHtml(__('Price')); ?></th>
<th scope="col"><?= $block->escapeHtml(__('Qty')); ?></th>
<th scope="col"><?= $block->escapeHtml(__('Subtotal')); ?></th>
</tr>
</thead>
<tbody>
<?php $items = $block->getItems();
foreach ($items as $item) : ?>
<tr>
<td><?php echo $item->getName(); ?></td>
<td><?php echo $item->getSku(); ?></td>
<td>Rs <?php echo $item->getPrice(); ?></td>
<td><?php echo floatval($item->getQtyOrdered()); ?></td>
<td>Rs <?php echo floatval((int)$item->getPrice() * (int)$item->getQtyOrdered()); ?></td>
</td>
</tr>
<?php endforeach; ?>
</tbody>
<tfoot>
<?php echo $this->getLayout()->createBlock("Nipuna\Mage\Block\Order\Totals")->setTemplate("Nipuna_Mage::checkout/totals.phtml")->toHtml(); ?>
</tfoot>
</table>
</div>
</section>
<section class="confirmOrder customer-detail">
<h2>Customer Details</h2>
<table class="table">
<tbody>
<tr>
<th>Email:</th>
<td><?php echo $block->getOrder()->getCustomerEmail() ?></td>
</tr>
<tr>
<th>Telephone:</th>
<td><?php echo $block->getCustomer()->getCustomAttribute('nav_customer_mobile_no')->getValue()
?>
</td>
</tr>
</tbody>
</table>
</section>
<section class="confirmOrder row addresses">
<div class="col-md-6 billing-address">
<div class="address-title">
<h3>Billing Address</h3>
<hr>
</div>
<div class="billing-address responsive_address">
<?php if (!empty($block->getOrder()->getBillingAddress()->getStreetLine(1))) : ?>
<?php echo $block->getOrder()->getBillingAddress()->getStreetLine(1); ?>
<br>
<?php endif; ?>
<?php if (!empty($block->getOrder()->getBillingAddress()->getStreetLine(2))) : ?>
<?php echo $block->getOrder()->getBillingAddress()->getStreetLine(2); ?> <br>
<?php endif; ?>
<?php if (!empty($block->getOrder()->getBillingAddress()->getCity())) : ?>
<?php echo $block->getOrder()->getBillingAddress()->getCity(); ?>
<?php endif; ?>
</div>
</div>
<div class="col-md-6 shipping-address">
<div class="address-title">
<h3>Shipping Address</h3>
<hr>
</div>
<div class=" shipping-address responsive_address">
<?php if (!empty($block->getOrder()->getBillingAddress()->getStreetLine(1))) : ?>
<?php echo $block->getOrder()->getShippingAddress()->getStreetLine(1); ?>
<br>
<?php endif; ?>
<?php if (!empty($block->getOrder()->getBillingAddress()->getStreetLine(1))) : ?>
<?php echo $block->getOrder()->getShippingAddress()->getStreetLine(2); ?>
<br>
<?php endif; ?>
<?php if (!empty($block->getOrder()->getBillingAddress()->getStreetLine(1))) : ?>
<?php echo $block->getOrder()->getShippingAddress()->getCity(); ?>
<?php endif; ?>
</div>
</div>
</section>
<br>
<hr>
<div class="actions-toolbar">
<div class="primary">
<a class="action primary continue" href="<?php /* @escapeNotVerified */ echo $block->getUrl(); ?>"><span><?php /* @escapeNotVerified */ echo __('Continue Shopping'); ?></span></a>
</div>
</div>
</div>
<?php endif; ?>
Editor is loading...