<?php
/**
 * This is the default template part for the cart
 * items loop.
 *
 * 
 * @version 1.1.0
 * @package IT_Exchange
 *
 * WARNING: Do not edit this file directly. To use
 * this template in a theme, copy over this file
 * to the exchange/content-checkout/loops/ directory
 * located in your theme.
*/
?>

<?php do_action( 'ninja_shop_content_checkout_before_items' ); ?>
<h3><?php _e( 'Order Details', 'it-l10n-ithemes-exchange' ); ?></h3>
<div id="ninja-shop-cart-items" class="ninja-shop-table">
<?php do_action( 'ninja_shop_content_checkout_before_items_loop' ); ?>
<?php while ( it_exchange( 'cart', 'cart-items' ) ) : ?>
	<?php do_action( 'ninja_shop_content_checkout_begin_items_loop' ); ?>

	<?php do_action( 'ninja_shop_content_checkout_before_items_table_row' ); ?>
	<div class="ninja-shop-table-row <?php echo it_exchange( 'cart-item', 'has-children' ) ? 'ninja-shop-table-row-parent' : ''; ?>">
		<?php do_action( 'ninja_shop_content_checkout_begin_items_table_row' ); ?>

		<?php foreach ( it_exchange_get_template_part_elements( 'content_checkout', 'items', array( 'item-featured-image', 'item-title', 'item-quantity', 'item-subtotal' ) ) as $item ) : ?>
			<?php
			/**
			 * Theme and add-on devs should add code to this loop by
			 * hooking into it_exchange_get_template_part_elements filter
			 * and adding the appropriate template file to their theme or add-on
			 */
			it_exchange_get_template_part( 'content-checkout/elements/' . $item );
			?>
		<?php endforeach; ?>
		<?php do_action( 'ninja_shop_content_checkout_end_items_table_row' ); ?>
	</div>

	<?php if ( it_exchange( 'cart-item', 'has-children' ) ): ?>
		<?php it_exchange_get_template_part( 'content-checkout/loops/item-children' ); ?>
	<?php endif; ?>

	<?php do_action( 'ninja_shop_content_checkout_after_items_table_row' ); ?>

	<?php do_action( 'ninja_shop_content_checkout_end_items_loop' ); ?>
<?php endwhile; ?>
<?php do_action( 'ninja_shop_content_content_checkout_after_items_loop' ); ?>
</div>
<?php do_action( 'ninja_shop_content_checkout_after_items' ); ?>
