Exchange Theme Templates: content-confirmation/elements/product.php

From IThemes Codex
Revision as of 16:45, August 5, 2013 by Kopepasah (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Default template part for the product on the transaction confirmation template part. *

Contents

Theme Location

theme/exchange/content-confirmation/elements/product.php

Action Hooks

Theme API

Default Code

<?php
/**
 * Default template part for the product on the
 * transaction confirmation 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, simply copy over this
 * file's content to the exchange/content-confirmation/elements/
 * directory located in your theme.
*/
?>

<?php do_action( 'it_exchange_content_confirmation_before_product_element' ); ?>
<div class="it-exchange-transaction-product">
	<?php it_exchange( 'transaction', 'product-attribute', array( 'attribute' => 'title', 'wrap' => 'h3' ) ); ?>
	<?php if ( it_exchange( 'transaction', 'has-product-downloads' ) ) : ?>
		<div class="it-exchange-transaction-product-downloads">
			<?php if ( ! it_exchange( 'transaction', 'get-cleared-for-delivery' ) ) : ?>
				<p><?php _e( 'The status for this transaction does not grant access to downloadable files. Once the transaction is updated to an appoved status, you will receive a followup email with your download links.', 'LION' ); ?></p>
			<?php endif; ?>
			<?php while( it_exchange( 'transaction', 'product-downloads' ) ) : ?>
				<div class="it-exchange-transaction-product-download">
					<h4 class="it-exchange-transaction-product-download-title">
						<?php it_exchange( 'transaction', 'product-download', array( 'attribute' => 'title' ) ); ?>
					</h4>
					<?php if ( it_exchange( 'transaction', 'has-product-download-hashes' ) ) : ?>
						<ul class="it-exchange-downloads-data">
							<?php while( it_exchange( 'transaction', 'product-download-hashes' ) ) : ?>
								<li class="it-exchange-download-data">
									<code class="it-exchange-download-hash">
										<?php it_exchange( 'transaction', 'product-download-hash', array( 'attribute' => 'hash' ) ); ?>
									</code>
									<?php if ( it_exchange( 'transaction', 'get-product-download-hash', array( 'attribute' => 'expires' ) ) ) : ?>
										<span class="it-exchange-download-expiration">
											<?php _e( 'Expires on', 'LION' ); ?> <?php it_exchange( 'transaction', 'product-download-hash', array( 'attribute' => 'expiration-date' ) ); ?>
										</span>
									<?php else : ?>
										<span class="it-exchange-download-expiration">
											<?php _e( 'No expiration date', 'LION' ); ?>
										</span>
									<?php endif; ?>
									<?php if ( it_exchange( 'transaction', 'get-product-download-hash', array( 'attribute' => 'download-limit' ) ) ) : ?>
										<span class="it-exchange-download-limit">
											<?php it_exchange( 'transaction', 'product-download-hash', array( 'attribute' => 'downloads-remaining' ) ); ?> <?php _e( 'download(s) remaining', 'LION' ); ?>
										</span>
									<?php else : ?>
										<span class="it-exchange-download-limit">
											<?php _e( 'Unlimited downloads', 'LION' ); ?>
										</span>
									<?php endif; ?>
									<?php if ( ! it_exchange( 'transaction', 'get-product-download-hash', array( 'attribute' => 'download-limit' ) ) || it_exchange( 'transaction', 'get-product-download-hash', array( 'attribute' => 'downloads-remaining' ) ) ) : ?>
										<?php if ( it_exchange( 'transaction', 'get-cleared-for-delivery' ) ) : ?>
											<span>
												<a href="<?php it_exchange( 'transaction', 'product-download-hash', array( 'attribute' => 'download-url' ) ); ?>"><?php _e( 'Download Now', 'LION' ); ?></a>
											</span>
										<?php endif; ?>
									<?php endif; ?>
								</li>
							<?php endwhile; ?>
						</ul>
					<?php endif; ?>
				</div>
			<?php endwhile; ?>
		</div>
	<?php endif; ?>
</div>
<?php do_action( 'it_exchange_content_confirmation_after_product_element' ); ?>

← Back to Exchange Theme Templates Page

Personal tools
Namespaces
Variants
Actions
iThemes Codex
Codex Navigation
Toolbox