Example #1
0
function accesspress_checkout_form_payment_cc($args = array())
{
    $args = wp_parse_args($args, array('cc_box_heading' => __('3. Enter Credit Card Information', 'premise'), 'product_id' => (int) $_GET['product_id'], 'card-name' => '', 'card-month' => '', 'card-year' => '', 'card-country' => '', 'card-postal' => ''));
    ?>
	<div class="accesspress-checkout-form-cc">

		<?php 
    if ($args['cc_box_heading']) {
        ?>
			<div class="accesspress-checkout-heading"><?php 
        echo esc_html($args['cc_box_heading']);
        ?>
</div>
		<?php 
    }
    ?>
		
		<div class="accesspress-checkout-form-row">
			<label for="accesspress-checkout-card-name" class="checkout-text-label"><?php 
    _e('Name on Card', 'premise');
    ?>
:</label>
			<input type="text" name="accesspress-checkout[card-name]" id="accesspress-checkout-card-name" class="input-text" value="<?php 
    echo esc_attr($args['card-name']);
    ?>
" />
		</div>
		
		<div class="accesspress-checkout-form-row">
			<label for="accesspress-checkout-card-number" class="checkout-text-label"><?php 
    _e('Card Number', 'premise');
    ?>
:</label>
			<input type="text" name="accesspress-checkout[card-number]" id="accesspress-checkout-card-number" class="input-text" value="" />
		</div>
		
		<div class="accesspress-checkout-form-row">
			<label for="accesspress-checkout-card-month" class="checkout-text-label"><?php 
    _e('Expiration Date', 'premise');
    ?>
</label>
			
			<select name="accesspress-checkout[card-month]" id="accesspress-checkout-card-month">
				<?php 
    foreach (range(1, 12) as $month) {
        printf('<option value="%d" %s>%d</option>', $month, selected($month, $args['card-month'], false), $month);
    }
    ?>
			</select>
			
			<select name="accesspress-checkout[card-year]" id="accesspress-checkout-card-year">
				<?php 
    $thisyear = (int) date('Y');
    foreach (range($thisyear, $thisyear + 10) as $year) {
        printf('<option value="%d" %s>%d</option>', $year, selected($year, $args['card-year'], false), $year);
    }
    ?>
			</select>
		</div>
		
		<div class="accesspress-checkout-form-row">
			<label for="accesspress-checkout-card-security" class="checkout-text-label"><?php 
    _e('Security Code', 'premise');
    ?>
:</label>
			<input type="password" name="accesspress-checkout[card-security]" id="accesspress-checkout-card-security" class="input-text input-text-short" size="3" value="" />
			<p><span class="description"><?php 
    _e('The security code should be located on the back of your card.', 'premise');
    ?>
</span></p>
		</div>
		
		<div class="accesspress-checkout-form-row">
			<label for="accesspress-checkout-card-country" class="checkout-text-label"><?php 
    _e('Country', 'premise');
    ?>
:</label>
			<select name="accesspress-checkout[card-country]" id="accesspress-checkout-card-country">
				<?php 
    foreach ((array) accesspress_get_countries() as $code => $label) {
        printf('<option value="%s" %s>%s</option>', esc_attr($code), selected($code, $args['card-country'], false), esc_html($label));
    }
    ?>
			</select>
		</div>
		
		<div class="accesspress-checkout-form-row">
			<label for="accesspress-checkout-card-postal" class="checkout-text-label"><?php 
    _e('ZIP/Postal Code', 'premise');
    ?>
:</label>
			<input type="text" name="accesspress-checkout[card-postal]" id="accesspress-checkout-card-postal" class="input-text input-text-short" size="12" value="<?php 
    echo esc_attr($args['card-postal']);
    ?>
" />
		</div>
		

	</div>
<?php 
}
Example #2
0
    function main_settings_metabox()
    {
        //@todo: translation support on title attributes
        ?>

		<p>
			<input type="checkbox" name="<?php 
        echo $this->get_field_name('ssl_checkout');
        ?>
" id="<?php 
        echo $this->get_field_id('ssl_checkout');
        ?>
" value="1"<?php 
        checked($this->get_field_value('ssl_checkout'));
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('ssl_checkout');
        ?>
"><?php 
        _e('Enable SSL on checkout page?', 'premise');
        ?>
</label>
			<br />
			<input type="checkbox" name="<?php 
        echo $this->get_field_name('ssl_everywhere');
        ?>
" id="<?php 
        echo $this->get_field_id('ssl_everywhere');
        ?>
" value="1"<?php 
        checked($this->get_field_value('ssl_everywhere'));
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('ssl_everywhere');
        ?>
" title="Enable SSL on checkout pages"><?php 
        _e('Enable SSL everywhere?', 'premise');
        ?>
</label>
		</p>

		<p>
			<?php 
        _e('Checkout Page', 'premise');
        ?>
:<br />
			<?php 
        wp_dropdown_pages(array('name' => $this->get_field_name('checkout_page'), 'id' => $this->get_field_id('checkout_page'), 'selected' => $this->get_field_value('checkout_page'), 'show_option_none' => __('Select Checkout Page', 'premise')));
        ?>
		</p>

		<p>
			<?php 
        _e('Login Page', 'premise');
        ?>
:<br />
			<?php 
        wp_dropdown_pages(array('name' => $this->get_field_name('login_page'), 'id' => $this->get_field_id('login_page'), 'selected' => $this->get_field_value('login_page'), 'show_option_none' => __('Select Login Page', 'premise')));
        ?>
		</p>

		<p>
			<?php 
        _e('Member Page', 'premise');
        ?>
:<br />
			<?php 
        wp_dropdown_pages(array('name' => $this->get_field_name('member_page'), 'id' => $this->get_field_id('member_page'), 'selected' => $this->get_field_value('member_page'), 'show_option_none' => __('Select Member Page', 'premise')));
        ?>
		</p>

		<p>
			<?php 
        _e('Default Country', 'premise');
        ?>
:<br />
			<select name="<?php 
        echo $this->get_field_name('default_country');
        ?>
">
				<?php 
        foreach ((array) accesspress_get_countries($this->get_field_value('default_country')) as $code => $label) {
            printf('<option value="%s" %s>%s</option>', esc_attr($code), selected($this->get_field_value('default_country'), $code, 0), esc_html($label));
        }
        ?>
			</select>
		</p>
	
	<?php 
    }