Rev 17495 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php $orderconfirmation_process = $orderconfirmation_process[0];$total = 0;$totalDiscount = 0;$quantity = count($orderconfirmation_process->result->orders);$storeName = $orderconfirmation_process->result->storeName;$totalShippingCost = 0;?><div class="order-conf"><p>Congratulations!</p><p>You have successfully ordered <br/><span><?php echo $quantity;?> item</span></p><?php foreach($orderconfirmation_process->result->orders as $order){$itemCost = str_replace(',', '', $order->totalAmount);$itemCost = number_format((float)$itemCost,2,'.','');$shippingCost = str_replace(',', '', $order->shippingCost);$shippingCost = number_format((float)$shippingCost,2,'.','');if(isset($order->gvAmount)) {$discount = str_replace(',', '', $order->gvAmount);$discount = number_format((float)$discount,2,'.','');$totalDiscount += $discount;}$total = $total + $itemCost + $shippingCost;$totalShippingCost = $totalShippingCost + $shippingCost;?><div class="ordered-item"><div>Order Id: <span><?php echo $order->orderId;?></span></div><div class="ordered-item-head clearfix"><div>Item Name</div><div>Insurance</div><div>Unit Price</div></div><!--ordered-item-head--><div class="ordered-item-body clearfix"><div><p><?php echo $order->itemName;?></p><?php if(isset($order->color)){?><span>Color -<?php echo $order->color;?></span><?php }?><br><span>Quantity -<?php echo $order->quantity;?></span></div><div>Rs <?php echo $order->insuranceAmount;?></div><div><p>Rs <?php echo $order->unitPrice;?></p></div></div><!--ordered-item-body--><div class="tt-price"><span>Total Price</span><span>Rs <?php echo $order->totalAmount;?></span></div><div class="ddate-div"><span>Estimated Delivery Date:</span><span><?php echo $order->promisedDelivery;?></span></div><!--ddate-div--><div class="or-status"><span>Order Status:</span><span><?php echo $order->status;?></span></div></div><!--ordered-item--><?php }?><?php if($totalDiscount>0):?><div class="gd-total clearfix gd-discount"><div>Discount</div><div>Rs. <?php echo $totalDiscount;?></div></div><?php endif;?><?php if($totalShippingCost>0):?><div class="gd-total clearfix"><div>Shipping</div><div>Rs. <?php echo $totalShippingCost;?></div></div><?php else :?><div class="gd-total clearfix"><div>Shipping</div><div><span>Free</span></div></div><?php endif;?><div class="gd-total clearfix"><div>Total Amount</div><div>Rs. <?php echo $total-$totalDiscount;?></div></div><?php if($orderconfirmation_process->result->isCod):?><h2>An executive will call you soon to confirm the order</h2><?php endif;?></div><script type="text/javascript"><?php if(isset($orderconfirmation_process) && !empty($orderconfirmation_process)){?>var orderConfirmation = <?php echo json_encode($orderconfirmation_process);?>;<?php }?>var pheight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);if(document.getElementsByClassName('order-conf')[0] != undefined){document.getElementsByClassName('order-conf')[0].style.minHeight = pheight - 153 +'px';}var storeName = '<?php echo $storeName;?>';</script>