<?php
/**
 * Default template part for the cart page.
 *
 * 
 * @version 1.1.0
 * @link http://ithemes.com/codex/page/Exchange_Template_Updates* @updated 1.0.0
 * @package IT_Exchange
 *
 * WARNING: Do not edit this file directly. To use
 * this template in a theme, simply copy over this
 * file's content to the exchange directory located
 * in your theme.
*/
?>

<?php do_action( 'ninja_shop_content_cart_before_wrap' ); ?>
<div id="ninja-shop-cart" class="ninja-shop-wrap">
	<?php do_action( 'ninja_shop_content_cart_begin_wrap' ); ?>

	<?php it_exchange_get_template_part( 'messages' ); ?>

	<?php if ( it_exchange( 'cart', 'has-cart-items' ) ) :  ?>

		<?php do_action( 'ninja_shop_content_cart_before_form' ); ?>
		<?php it_exchange( 'cart', 'form-open' ); ?>
			<?php do_action( 'ninja_shop_content_cart_begin_form' ); ?>

			<?php
			// Loops we want to include, in the order we want them.
			$loops = array( 'items', 'line-items', 'coupons', 'totals', 'actions' );
			foreach( it_exchange_get_template_part_loops( 'content-cart', 'has-cart-item', $loops ) as $loop ) :
				it_exchange_get_template_part( 'content-cart/loops/' . $loop );
			endforeach;
			?>

			<?php it_exchange( 'cart', 'form-close' ); ?>
		<?php do_action( 'ninja_shop_cart_end' ); ?>
	<?php else : ?>
		<?php do_action( 'ninja_shop_empty_cart_start' ); ?>
			<p><?php _e( 'There are no items in your cart', 'it-l10n-ithemes-exchange' ); ?></p>
		<?php do_action( 'ninja_shop_empty_cart_end' ); ?>
	<?php endif; ?>
</div>
