Exchange Theme API: coupons (apply)

From IThemes Codex
Revision as of 10:59, August 1, 2013 by Kopepasah (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
it_exchange( 'coupons', 'apply', array( 'option' => 'value' ) )
	
Parameters
	string - $context the context or context.tag combination, if context.tag is used, the tag parameter can be omitted.
	string - $tag the tag, can be hyphenated or not.
	mixed  - $options associative array, or url-style name=value pairs separated by ampersands (&).
Returns
	The field for applying a coupon.

Description

Used to output the field for applying the coupons.

Options

'type' - Used to sets the type of coupon.
	$default: false
	$options: false, cart
'format' - Used to sets the format of the output.
	$default: form-field
	$options: form-field
'class' - Used to set the class of the field.
	$default: apply-coupon
	$options: Any valid class name.
'placeholder' - Used to set the placeholder of the input.
	$default: 'Coupon Code'
	$options: Any valid text.
'before' - Used to output content before the input.
	$default: empty
	$options: Any valid html.
'after' - Used to output content after the input.
	$default: empty
	$options: Any valid html.
'return' - Used to return (instead of echo) the output.
	$default: false
	$options: true, false

Usage

<?php it_exchange( 'coupons', 'apply', array( 'type' => 'cart' ) ); ?>

Examples

Personal tools
Namespaces
Variants
Actions
iThemes Codex
Codex Navigation
Toolbox