Exchange Theme Templates: content-cart.php

From IThemes Codex
Jump to: navigation, search

Default template part for the cart page.

Contents

Theme Location

theme/exchange/content-cart.php

Action Hooks

Theme API

Default Code

<?php
/**
 * Default template part for the cart page.
 * 
 * @since 0.4.0
 * @version 1.0.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( 'it_exchange_content_cart_before_wrap' ); ?>
<div id="it-exchange-cart" class="it-exchange-wrap">
	<?php do_action( 'it_exchange_content_cart_begin_wrap' ); ?>
	
	<?php it_exchange_get_template_part( 'messages' ); ?>
	
	<?php if ( it_exchange( 'cart', 'has-cart-items' ) ) :  ?>
		
		<?php do_action( 'it_exchange_content_cart_before_form' ); ?>
		<?php it_exchange( 'cart', 'form-open' ); ?>
			<?php do_action( 'it_exchange_content_cart_begin_form' ); ?>
            
			<?php
			// Loops we want to include, in the order we want them.
			$loops = array( '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( 'it_exchange_cart_end' ); ?>
	<?php else : ?>
		<?php do_action( 'it_exchange_empty_cart_start' ); ?>
			<p><?php _e( 'There are no items in your cart', 'LION' ); ?></p>
		<?php do_action( 'it_exchange_empty_cart_end' ); ?>
	<?php endif; ?>
</div>

← Back to Exchange Theme Templates Page

Personal tools
Namespaces
Variants
Actions
iThemes Codex
Codex Navigation
Toolbox