Subversion Repositories SmartDukaan

Rev

Rev 17492 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
10582 lgm 1
<?php $orderconfirmation_process = $orderconfirmation_process[0];
2
$total = 0;
11920 anikendra 3
$totalDiscount = 0;
11913 anikendra 4
$quantity = count($orderconfirmation_process->result->orders);
5
$storeName = $orderconfirmation_process->result->storeName;
17491 manish.sha 6
$totalShippingCost = 0;
11913 anikendra 7
?>
10582 lgm 8
<div class="order-conf">
11927 anikendra 9
  <p>Congratulations!</p>
10582 lgm 10
  <p>You have successfully ordered <br/><span><?php echo $quantity;?> item</span></p>
11
  <?php foreach($orderconfirmation_process->result->orders as $order){
12
    $itemCost = str_replace(',', '', $order->totalAmount);
13
    $itemCost = number_format((float)$itemCost,2,'.','');
17491 manish.sha 14
    $shippingCost = str_replace(',', '', $order->shippingCost);
15
    $shippingCost = number_format((float)$shippingCost,2,'.','');
11920 anikendra 16
    if(isset($order->gvAmount)) {
17
	    $discount = str_replace(',', '', $order->gvAmount);
18
	    $discount = number_format((float)$discount,2,'.','');
19
	    $totalDiscount += $discount;
20
    }
17495 manish.sha 21
    $total = $total + $itemCost + $shippingCost;
17491 manish.sha 22
    $totalShippingCost = $totalShippingCost + $shippingCost;?>
10582 lgm 23
  <div class="ordered-item">
24
    <div>Order Id: <span><?php echo $order->orderId;?></span></div>
25
    <div class="ordered-item-head clearfix">
26
      <div>Item Name</div>
27
      <div>Insurance</div>
28
      <div>Unit Price</div>
29
    </div><!--ordered-item-head-->
30
    <div class="ordered-item-body clearfix">
31
      <div>
32
        <p><?php echo $order->itemName;?></p>
33
        <?php if(isset($order->color)){?>
34
        <span>Color -<?php echo $order->color;?></span>
17495 manish.sha 35
        <?php }?>
17492 manish.sha 36
        <span>Quantity -<?php echo $order->quantity;?></span>
10582 lgm 37
      </div>
38
      <div>
39
        Rs <?php echo $order->insuranceAmount;?>
40
      </div>
41
      <div>
17492 manish.sha 42
        <p>Rs <?php echo $order->unitPrice;?></p>
10582 lgm 43
      </div>
44
    </div><!--ordered-item-body-->
45
    <div class="tt-price">
46
      <span>Total Price</span>
47
      <span>Rs <?php echo $order->totalAmount;?></span>
48
    </div>
49
    <div class="ddate-div">
50
      <span>Estimated Delivery Date:</span>
51
      <span><?php echo $order->promisedDelivery;?></span>
52
    </div><!--ddate-div-->
53
    <div class="or-status">
54
      <span>Order Status:</span>
55
      <span><?php echo $order->status;?></span>
56
    </div>
57
  </div><!--ordered-item-->
58
  <?php }?>
11920 anikendra 59
  <?php if($totalDiscount>0):?>
11927 anikendra 60
  <div class="gd-total clearfix gd-discount">
11920 anikendra 61
    <div>Discount</div>
62
    <div>Rs. <?php echo $totalDiscount;?></div>
63
  </div>
64
  <?php endif;?>
17491 manish.sha 65
  <?php if($totalShippingCost>0):?>
11920 anikendra 66
  <div class="gd-total clearfix">
17491 manish.sha 67
    <div>Shipping</div>
68
    <div>Rs. <?php echo $totalShippingCost;?></div>
69
  </div>
17495 manish.sha 70
  <?php else :?>
71
  <div class="gd-total clearfix">
72
    <div>Shipping</div>
73
    <div><span>Free</span></div>
74
  </div>
17491 manish.sha 75
  <?php endif;?>
76
  <div class="gd-total clearfix">
10582 lgm 77
    <div>Total Amount</div>
11927 anikendra 78
    <div>Rs. <?php echo $total-$totalDiscount;?></div>
10582 lgm 79
  </div>
11913 anikendra 80
<?php if($orderconfirmation_process->result->isCod):?>
81
<h2>An executive will call you soon to confirm the order</h2>
82
<?php endif;?>
10697 lgm 83
</div>
84
<script type="text/javascript">
85
<?php if(isset($orderconfirmation_process) && !empty($orderconfirmation_process)){?>
11332 lgm 86
var orderConfirmation = <?php echo json_encode($orderconfirmation_process);?>;
10697 lgm 87
<?php }?>
11332 lgm 88
var pheight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
89
if(document.getElementsByClassName('order-conf')[0] != undefined){
90
    document.getElementsByClassName('order-conf')[0].style.minHeight = pheight - 153 +'px';  
91
}
11913 anikendra 92
var storeName = '<?php echo $storeName;?>';
93
</script>