Exchange Theme Templates: content-cart/loops/coupons.php

From IThemes Codex
Jump to: navigation, search

This is the default template part for the coupons loop in the content-cart template part.

Contents

Theme Location

theme/exchange/content-cart/loops/coupons.php

Action Hooks

Theme API

Default Code

<?php
/**
 * This is the default template part for the
 * coupons loop in the content-cart
 * template part.
 *
 * @since 1.1.0
 * @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-cart/loops/ directory
 * located in your theme.
*/
?>

<?php do_action( 'it_exchange_content_cart_before_coupons' ); ?>
<div id="it-exchange-cart-coupons" class="it-exchange-table">
<?php do_action( 'it_exchange_content_cart_before_coupons_loop' ); ?>
<?php while ( it_exchange( 'coupons', 'applied', array( 'type' => 'cart' ) ) ) : ?>
	<?php do_action( 'it_exchange_content_cart_begin_coupons_loop' ); ?>
	<div class="it-exchange-table-row">
		<?php foreach ( it_exchange_get_template_part_elements( 'content_cart', 'coupons', array( 'coupon-code', 'coupon-discount', 'coupon-remove' ) ) as $coupon ) : ?>
			<?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-cart/elements/' . $coupon );
			?>
		<?php endforeach; ?>
	</div>
	<?php do_action( 'it_exchange_content_cart_end_coupons_loop' ); ?>
<?php endwhile; ?>
<?php do_action( 'it_exchange_content_cart_after_coupons_loop' ); ?>
</div>
<?php do_action( 'it_exchange_content_cart_after_coupons' ); ?>

← Back to Exchange Theme Templates Page

Personal tools
Namespaces
Variants
Actions
iThemes Codex
Codex Navigation
Toolbox