1. <?php
  2. /**
  3.  * Cart Page
  4.  *
  5.  * @author      WooThemes
  6.  * @package     WooCommerce/Templates
  7.  * @version     1.6.4
  8.  */
  9.  
  10. global $woocommerce;
  11. ?>
  12.  
  13. <?php $woocommerce->show_messages(); ?>
  14.  
  15.  
  16.  
  17. <form action="<?php echo esc_url( $woocommerce->cart->get_cart_url() ); ?>" method="post">
  18. <?php do_action( 'woocommerce_before_cart_table' ); ?>
  19.  
  20.  
  21.  
  22.  
  23. <?php do_action( 'woocommerce_before_cart_contents' ); ?>
  24. <h2>Hi! Here's what you put in your cart.</h2>
  25.  
  26. <div id="item-remove">
  27. <h3 class="product-remove">Click To Remove This Item</h3>
  28. <?php
  29.         if ( sizeof( $woocommerce->cart->get_cart() ) > 0 ) {
  30.             foreach ( $woocommerce->cart->get_cart() as $cart_item_key => $values ) {
  31.                 $_product = $values['data'];
  32.                 if ( $_product->exists() && $values['quantity'] > 0 ) {
  33.                     ?>
  34.                    
  35.                         <!-- Remove from cart link -->
  36.                        
  37.                             <?php
  38.                                 echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf('<a href="%s" class="remove" title="%s">&times;</a>', esc_url( $woocommerce->cart->get_remove_url( $cart_item_key ) ), __('Remove this item', 'woocommerce') ), $cart_item_key );
  39.                             ?>
  40.                        
  41. </div><!--end item-remove-->
  42.  
  43. <div id="item-thumb">
  44.  <h3 class="product-thumbnail">Your Item Photo</h3>
  45.  <!-- The thumbnail -->
  46.     <?php
  47.     $thumbnail = apply_filters( 'woocommerce_in_cart_product_thumbnail', $_product->get_image(), $values, $cart_item_key );
  48.     printf('<a href="%s">%s</a>', esc_url( get_permalink( apply_filters('woocommerce_in_cart_product_id', $values['product_id'] ) ) ), $thumbnail );
  49.     ?>
  50. </div><!--end item-thumb-->
  51.  
  52.  
  53. <div id="item-name">
  54. <h3 class="product-name"><?php _e('Description', 'woocommerce'); ?></h3>
  55. <!-- Product Name -->
  56.                        
  57.                             <?php
  58.                                 if ( ! $_product->is_visible() || ( $_product instanceof WC_Product_Variation && ! $_product->parent_is_visible() ) )
  59.                                     echo apply_filters( 'woocommerce_in_cart_product_title', $_product->get_title(), $values, $cart_item_key );
  60.                                 else
  61.                                     printf('<a href="%s">%s</a>', esc_url( get_permalink( apply_filters('woocommerce_in_cart_product_id', $values['product_id'] ) ) ), apply_filters('woocommerce_in_cart_product_title', $_product->get_title(), $values, $cart_item_key ) );
  62.  
  63.                                 // Meta data
  64.                                 echo $woocommerce->cart->get_item_data( $values );
  65.  
  66.                                 // Backorder notification
  67.                                 if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $values['quantity'] ) )
  68.                                     echo '<p class="backorder_notification">' . __('Available on backorder', 'woocommerce') . '</p>';
  69.                             ?>
  70.                        
  71. </div><!--end item-name-->
  72.  
  73.  
  74.  
  75. <div id="item-price">
  76.     <h3 class="product-price"><?php _e('Price', 'woocommerce'); ?></h3>
  77.     <!-- Product price -->
  78.                        
  79.                             <?php
  80.                                 $product_price = get_option('woocommerce_display_cart_prices_excluding_tax') == 'yes' || $woocommerce->customer->is_vat_exempt() ? $_product->get_price_excluding_tax() : $_product->get_price();
  81.  
  82.                                 echo apply_filters('woocommerce_cart_item_price_html', woocommerce_price( $product_price ), $values, $cart_item_key );
  83.                             ?>
  84.                        
  85. </div><!--end item-price-->
  86.  
  87. <div id="item-quantity">
  88. <h3 class="product-quantity"><?php _e('Quantity', 'woocommerce'); ?></h3>
  89. <!-- Quantity inputs -->
  90.                        
  91.                             <?php
  92.                                 if ( $_product->is_sold_individually() ) {
  93.                                     $product_quantity = '1';
  94.                                 } else {
  95.                                     $data_min = apply_filters( 'woocommerce_cart_item_data_min', '', $_product );
  96.                                     $data_max = ( $_product->backorders_allowed() ) ? '' : $_product->get_stock_quantity();
  97.                                     $data_max = apply_filters( 'woocommerce_cart_item_data_max', $data_max, $_product );
  98.  
  99.                                     $product_quantity = sprintf( '<div class="quantity"><input name="cart[%s][qty]" data-min="%s" data-max="%s" value="%s" size="4" title="Qty" class="input-text qty text" maxlength="12" /></div>', $cart_item_key, $data_min, $data_max, esc_attr( $values['quantity'] ) );
  100.                                 }
  101.  
  102.                                 echo apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key );
  103.                             ?>
  104.                        
  105.  
  106. </div><!--end item-quantity-->
  107.  
  108.  
  109.  
  110. <div id="item-subtotal">
  111. <h3 class="product-subtotal"><?php _e('Sub-Total', 'woocommerce'); ?></h3>
  112. <!-- Product subtotal -->
  113.                        
  114.                             <?php
  115.                                 echo apply_filters( 'woocommerce_cart_item_subtotal', $woocommerce->cart->get_product_subtotal( $_product, $values['quantity'] ), $values, $cart_item_key );
  116.                             ?>
  117.                        
  118.  
  119. </div><!--end item-subtotal-->
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.                   <?php
  128.                 }
  129.             }
  130.         }
  131.  
  132.         do_action( 'woocommerce_cart_contents' );
  133.         ?>
  134.  
  135.  
  136.  
  137.  
  138.         <div id="coupon-box">
  139.             <h3>Have A Coupon?</h3>
  140.                 <?php if ( get_option( 'woocommerce_enable_coupons' ) == 'yes' && get_option( 'woocommerce_enable_coupon_form_on_cart' ) == 'yes') { ?>
  141.                     <div class="coupon">
  142.  
  143.                         <label for="coupon_code"><?php _e('Coupon', 'woocommerce'); ?>:</label> <input name="coupon_code" class="input-text" id="coupon_code" value="" /> <input type="submit" class="button small-red" name="apply_coupon" value="<?php _e('Apply Coupon', 'woocommerce'); ?>" />
  144.  
  145.                         <?php do_action('woocommerce_cart_coupon'); ?>
  146.  
  147.                     </div>
  148.  
  149.         </div><!--end coupon-box-->
  150.  
  151.         <div id="extras-box">
  152.             <h3>Wait! We've Discounted These Items For You Too.</h3>
  153.           <div id="add-ons">
  154.          <?php echo do_shortcode('[display-addons length=5 mode=loop]');?>
  155. </div><!--end add-ons-->
  156.  
  157.         </div><!--end extras-box-->
  158.  
  159.  
  160. <div id="proceed-checkout-box">
  161.                 <?php } ?>
  162.                  
  163.                 <input type="submit" class="button" name="update_cart" value="<?php _e('Update Cart', 'woocommerce'); ?>" /> <input type="submit" class="checkout-button button alt green-button" name="proceed" value="<?php _e('Proceed to Checkout &rarr;', 'woocommerce'); ?>" />
  164.                   <img id="payment-icons" src="<?php bloginfo('template_directory'); ?>/images/payment-icons-sm.png" alt="Pay with your credit card, debit card, or paypal. Safe and Secure." />
  165.                 <?php do_action('woocommerce_proceed_to_checkout'); ?>
  166.  
  167.                 <?php $woocommerce->nonce_field('cart') ?>
  168.  
  169. </div><!--end proceed-checkout-box-->
  170.  
  171.         <?php do_action( 'woocommerce_after_cart_contents' ); ?>
  172.  
  173. <?php do_action( 'woocommerce_after_cart_table' ); ?>
  174. </form>
  175.  
  176.      
  177.  
  178.  
  179.  
  180. <div class="cart-collaterals">
  181.  
  182.     <?php do_action('woocommerce_cart_collaterals'); ?>
  183.  
  184.     <?php woocommerce_cart_totals(); ?>
  185.  
  186. </div><!--end cart-collaterals-->