Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $order_id = $Order -> current_order_id(); ?>
- <?php $items_count = $Item -> item_count($order_id, 'items'); ?>
- <?php $units_count = $Item -> item_count($order_id, 'units'); ?>
- <?php $subtotal = $Order -> total($order_id, false, false, true, true, false); ?>
- <?php $discount = $Discount -> total($order_id); ?>
- <?php $shipping = $Order -> shipping_total($subtotal, $order_id); ?>
- <?php $tax_total = $Order -> tax_total($order_id); ?>
- <?php $total_price = $Order -> total($order_id, true, true); ?>
- <?php if (!empty($options['hide_when_empty']) && $options['hide_when_empty'] == 1 && empty($items_count)) : ?>
- <?php else : ?>
- <?php if (empty($isajax) || $isajax == false) : ?>
- <?php echo $args['before_title']; ?><span class="cart"><?php echo $options['title']; ?></span><?php echo $args['after_title']; ?>
- <div id="<?php echo $this -> pre; ?>_cart_widget">
- <?php endif; ?>
- <?php if (!empty($errors)) : ?>
- <ul>
- <?php foreach ($errors as $err) : ?>
- <li class="<?php echo $this -> pre; ?>error"><?php echo $err; ?></li>
- <?php endforeach; ?>
- </ul>
- <br/>
- <?php endif; ?>
- <div id="widget-cart-errors" style="display:none;"></div>
- <?php if (!empty($successmsg)) : ?>
- <ul>
- <li class="<?php echo $this -> pre; ?>successmsg"><?php echo $successmsg; ?></li>
- </ul>
- <br/>
- <?php endif; ?>
- <?php if (empty($options['show']) || $options['show'] == "normal") : ?>
- <ul>
- <li><?php _e('Total Items', $this -> plugin_name); ?>: <b><?php echo $items_count; ?></b></li>
- <li><?php _e('Total Units', $this -> plugin_name); ?>: <b><?php echo $units_count; ?></b></li>
- <?php if (!empty($items_count) && $items_count != 0) : ?>
- <?php if ($this -> get_option('shippingcalc') == "Y" || $this -> get_option('enablecoupons') == "Y") : ?>
- <li><?php _e('Sub Total', $this -> plugin_name); ?>: <b><?php echo $wpcoHtml -> currency_price($subtotal); ?></b></li>
- <?php if ($this -> get_option('shippingcalc') == "Y" && !empty($shipping) && $shipping != 0) : ?>
- <li><?php _e('Shipping', $this -> plugin_name); ?>: <b><?php echo $wpcoHtml -> currency_price($shipping); ?></b></li>
- <?php endif; ?>
- <?php if ($this -> get_option('enablecoupons') && !empty($discount) && $discount != 0) : ?>
- <li><?php _e('Discount', $this -> plugin_name); ?>: <b><?php echo $wpcoHtml -> currency_price($discount); ?></b></li>
- <?php endif; ?>
- <?php endif; ?>
- <?php endif; ?>
- <?php if ($this -> get_option('tax_calculate') == "Y" && !empty($tax_total)) : ?>
- <li><?php echo $this -> get_option('tax_name'); ?> (<?php echo $wpcoTax -> get_tax_percentage(); ?>%): <strong><?php echo $wpcoHtml -> currency_price($tax_total); ?></strong></li>
- <?php endif; ?>
- <li><?php _e('Total Price', $this -> plugin_name); ?>: <b><?php echo $wpcoHtml -> currency_price($total_price); ?></b></li>
- </ul>
- <?php else : ?>
- <ul>
- <li><?php _e('Total', $this -> plugin_name); ?>: <strong><?php echo $wpcoHtml -> currency_price($total_price); ?></strong></li>
- </ul>
- <?php endif; ?>
- <?php if (!empty($items_count) && $items_count != 0) : ?>
- <br/>
- <ul>
- <li><a href="<?php echo $wpcoHtml -> cart_url(); ?>" title="<?php _e('View your shopping cart', $this -> plugin_name); ?>"><?php _e('View Shopping Cart', $this -> plugin_name); ?></a></li>
- <?php if ($wpcoField -> globalfields()) : ?>
- <?php $method = 'cart'; ?>
- <?php $completeurl = $wpcoHtml -> cart_url(); ?>
- <?php else : ?>
- <?php global $user_ID; ?>
- <?php $tempmethod = ($this -> get_option('shippingdetails') == "Y") ? 'shipping' : 'billing'; ?>
- <?php $method = ($user_ID) ? $tempmethod : 'contacts'; ?>
- <?php
- $completeurl = $wpcoHtml -> cart_url();
- switch ($method) {
- case 'contacts' :
- $completeurl = $wpcoHtml -> contacts_url(true);
- break;
- case 'shipping' :
- $completeurl = $wpcoHtml -> ship_url();
- break;
- case 'billing' :
- $completeurl = $wpcoHtml -> bill_url();
- break;
- default :
- $completeurl = $wpcoHtml -> cart_url();
- break;
- }
- ?>
- <?php endif; ?>
- <li><a href="<?php echo $completeurl; ?>" title="<?php _e('Complete your order', $this -> plugin_name); ?>"><?php _e('Complete Order', $this -> plugin_name); ?></a></li>
- <li><a href="#wpco_cart_widget" onclick="if (!confirm('<?php _e('Are you sure you wish to remove all items from your shopping cart?', $this -> plugin_name); ?>')) { return false; } else { wpco_emptycart('wpco_cart_widget'); }" title="<?php _e('Remove all items from your shopping cart', $this -> plugin_name); ?>"><?php _e('Empty Shopping Cart', $this -> plugin_name); ?></a></li>
- </ul>
- <?php endif; ?>
- <!-- //neha -->
- <?php if ($options['enablecoupons'] == "Y") : ?>
- <?php $wpcoDb -> model = $Coupon -> model; ?>
- <?php $couponscount = $wpcoDb -> count(); ?>
- <?php if ($this -> get_option('enablecoupons') == "Y" && !empty($couponscount)) : ?>
- <?php $wpcoDb -> model = $Discount -> model; ?>
- <?php $dcount = $wpcoDb -> count(array('order_id' => $order_id)); ?>
- <?php if ($this -> get_option('multicoupon') == "Y" || (empty($dcount) && $this -> get_option('multicoupon') == "N")) : ?>
- <br/>
- <small><?php _e('Do you have a discount coupon code?', $this -> plugin_name); ?></small>
- <form class="<?php echo $this -> pre; ?>" action="" method="post">
- <input type="hidden" name="<?php echo $this -> pre; ?>method" value="applycoupon" />
- <input type="text" name="code" value="" />
- <input class="button" style="cursor:pointer;" type="submit" name="applycode" value="<?php _e('Apply Code', $this -> plugin_name); ?>" />
- </form>
- <?php endif; ?>
- <?php endif; ?>
- <?php endif; ?>
- <?php global $user_ID; ?>
- <?php if ($user_ID) : ?>
- <?php $wpcoDb -> model = $Order -> model; ?>
- <?php $orderscount = $wpcoDb -> count(array('completed' => "Y", 'user_id' => $user_ID)); ?>
- <?php $hasorders = (!empty($orderscount)) ? true : false; ?>
- <?php endif; ?>
- <?php if ($this -> has_downloads() || $hasorders == true) : ?>
- <br/>
- <ul>
- <?php if ($this -> has_downloads()) : ?>
- <li><a href="<?php echo $wpcoHtml -> downloads_url(); ?>" title="<?php _e('View all your downloads', $this -> plugin_name); ?>"><?php _e('Downloads Management', $this -> plugin_name); ?></a></li>
- <?php endif; ?>
- <?php if ($hasorders == true) : ?>
- <li><a href="<?php echo $wpcoHtml -> account_url(); ?>" title="<?php _e('View your complete orders history', $this -> plugin_name); ?>"><?php _e('Orders History', $this -> plugin_name); ?></a></li>
- <?php endif; ?>
- </ul>
- <?php endif; ?>
- <?php if (empty($isajax) || $isajax == false) : ?>
- </div>
- <?php endif; ?>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment