Example #1
0
<?php

use Jigoshop\Helper\Forms;
use Jigoshop\Helper\Product;
/**
 * @var $method \Jigoshop\Shipping\Method Method to display.
 * @var $order \Jigoshop\Entity\Order Order to display.
 */
?>
<li class="list-group-item shipping-<?php 
echo $method->getId();
?>
 clearfix">
	<label>
		<input type="radio" name="order[shipping]" value="<?php 
echo $method->getId();
?>
" <?php 
echo Forms::checked($order->hasShippingMethod($method), true);
?>
 />
		<?php 
echo $method->getName();
?>
	</label>
	<span class="pull-right"><?php 
echo Product::formatPrice($method->calculate($order));
?>
</span>
</li>
Example #2
0
<?php

use Jigoshop\Helper\Forms;
/**
 * @var $value mixed Option value.
 * @var $label string Option label.
 * @var $disabled boolean Whether item is disabled.
 * @var $current mixed Currently selected value(s).
 */
?>
<option value="<?php 
echo $value;
?>
" <?php 
echo Forms::selected($value, $current);
?>
 <?php 
echo Forms::disabled($disabled);
?>
><?php 
echo $label;
?>
</option>
Example #3
0
    ?>
</label></th>
			<td><code><?php 
    echo $homeUrl;
    ?>
/<?php 
    echo $base;
    ?>
/product-category/sample-product/</code></td>
		</tr>
	<?php 
}
?>
	<tr>
		<th><label><input name="product_permalink" id="jigoshop_custom_selection" type="radio" value="custom" <?php 
echo Forms::checked(in_array($permalink, $structures), false);
?>
 /> <?php 
_e('Custom Base', 'jigoshop');
?>
</label></th>
		<td>
			<input name="product_permalink_structure" id="jigoshop_permalink_structure" type="text" value="<?php 
echo $permalink;
?>
" class="regular-text code">
			<span class="description"><?php 
_e('Enter a custom base to use. A base <strong>must</strong> be set or WordPress will use default instead.', 'jigoshop');
?>
</span>
		</td>
Example #4
0
	<?php 
\Jigoshop\Helper\Forms::text(array('name' => 'address[city]', 'label' => __('City', 'jigoshop'), 'value' => $address->getCity()));
?>
	<?php 
\Jigoshop\Helper\Forms::text(array('name' => 'address[postcode]', 'label' => __('Postcode', 'jigoshop'), 'value' => $address->getPostcode()));
?>
	<?php 
\Jigoshop\Helper\Forms::field(Country::hasStates($address->getCountry()) ? 'select' : 'text', array('name' => 'address[state]', 'label' => __('State/province', 'jigoshop'), 'value' => $address->getState(), 'options' => Country::getStates($address->getCountry())));
?>
	<?php 
\Jigoshop\Helper\Forms::select(array('name' => 'address[country]', 'label' => __('Country', 'jigoshop'), 'value' => $address->getCountry(), 'options' => Country::getAllowed()));
?>
	<?php 
\Jigoshop\Helper\Forms::text(array('name' => 'address[phone]', 'label' => __('Phone', 'jigoshop'), 'value' => $address->getPhone()));
?>
	<?php 
\Jigoshop\Helper\Forms::text(array('name' => 'address[email]', 'label' => __('Email', 'jigoshop'), 'value' => $address->getEmail()));
?>
	<a href="<?php 
echo $myAccountUrl;
?>
" class="btn btn-default"><?php 
_e('Go back to My account', 'jigoshop');
?>
</a>
	<button class="btn btn-success pull-right" name="action" value="save_address"><?php 
_e('Save', 'jigoshop');
?>
</button>
</form>
Example #5
0
			<style type="text/css">
				.jigoshop form #payment-methods li > div {
					display: block;
				}
			</style>
		</noscript>
	</div>
	<?php 
}
?>
	<?php 
if (!empty($termsUrl)) {
    ?>
	<div class="col-md-6 col-xs-12 pull-right toggle-panels">
		<?php 
    Forms::checkbox(array('name' => 'terms', 'description' => sprintf(__('I accept the <a href="%s">Terms &amp; Conditions</a>'), $termsUrl), 'checked' => false));
    ?>
		</div>
		<div class="clear"></div>
	<?php 
}
?>
	<?php 
if (!empty($verificationMessage)) {
    ?>
		<?php 
    Render::output('shop/checkout/verification_message', array('message' => $verificationMessage));
    ?>
	<?php 
}
?>
Example #6
0
<?php

use Jigoshop\Helper\Forms;
use Jigoshop\Helper\Product;
/**
 * @var $method \Jigoshop\Shipping\Method Method to display.
 * @var $cart \Jigoshop\Entity\Cart Current cart.
 */
?>
<li class="list-group-item shipping-<?php 
echo $method->getId();
?>
 clearfix">
	<label>
		<input type="radio" name="jigoshop_order[shipping_method]" value="<?php 
echo $method->getId();
?>
" <?php 
echo Forms::checked($cart->hasShippingMethod($method), true);
?>
 />
		<?php 
echo $method->getTitle();
?>
	</label>
	<span class="pull-right"><?php 
echo Product::formatPrice($method->calculate($cart));
?>
</span>
</li>
Example #7
0
"><?php 
_e('Attributes:', 'jigoshop');
?>
</label>
	<select id="<?php 
echo $attribute_id;
?>
"  name="<?php 
echo $attribute_name;
?>
">
		<?php 
foreach ($attributes as $attr) {
    /** @var $attr \Jigoshop\Entity\Product\Attribute */
    ?>
			<option value="<?php 
    echo $attr->getId();
    ?>
" <?php 
    Forms::selected($attr->getId(), $attribute);
    ?>
><?php 
    echo $attr->getLabel();
    ?>
</option>
		<?php 
}
?>
	</select>
</p>
Example #8
0
		<div class="price_slider_amount">
			<button type="submit" class="button"><?php 
_e('Filter', 'jigoshop');
?>
</button>
			<?php 
_e('Price: ', 'jigoshop');
?>
<span></span>
			<input type="hidden" id="max_price" name="max_price" value="<?php 
echo esc_attr($max);
?>
" />
			<input type="hidden" id="min_price" name="min_price" value="0" />
			<?php 
\Jigoshop\Helper\Forms::printHiddenFields($fields, array('max_price', 'min_price'));
?>
		</div>
		<div class="clear"></div>
	</div>
</form>
<script type="text/javascript">
	/*<![CDATA[*/
	jQuery(document).ready(function($){
		// Price slider
		var min_price = parseInt($('.price_slider_amount #min_price').val());
		var max_price = parseInt($('.price_slider_amount #max_price').val());
		var html = '<?php 
echo sprintf(Currency::format(), Currency::symbol(), Currency::code(), '%s%');
?>
';
Example #9
0
 * @var $terms array Terms to display.
 * @var $value string Current value.
 * @var $walker \Jigoshop\Web\CategoryWalker Walker to traverse list.
 * @var $shopUrl string URL to the shop main page.
 */
echo $before_widget;
if ($title) {
    echo $before_title . $title . $after_title;
}
?>
<select name="<?php 
echo Types::PRODUCT_CATEGORY;
?>
" id="dropdown_product_category">
	<option value="" <?php 
Forms::selected($value, '');
?>
><?php 
_e('View all categories', 'jigoshop');
?>
</option>
	<?php 
echo $walker->walk($terms, 0, $query);
?>
</select>
<script type='text/javascript'>
	jQuery(function($){
		$('#dropdown_product_category').on('change', function(event){
			var url = $('option:selected', $(event.target)).data('url');
			if (url !== undefined){
				window.location.href = url;
Example #10
0
?>
<h1><?php 
_e('My account &raquo; Change password', 'jigoshop');
?>
</h1>
<?php 
Render::output('shop/messages', array('messages' => $messages));
?>
<form class="" role="form" method="post">
	<?php 
\Jigoshop\Helper\Forms::text(array('name' => 'password', 'type' => 'password', 'label' => __('Current password', 'jigoshop'), 'value' => ''));
?>
	<?php 
\Jigoshop\Helper\Forms::text(array('name' => 'new-password', 'type' => 'password', 'label' => __('New password', 'jigoshop'), 'value' => ''));
?>
	<?php 
\Jigoshop\Helper\Forms::text(array('name' => 'new-password-2', 'type' => 'password', 'label' => __('Re-type new password', 'jigoshop'), 'value' => ''));
?>
	<a href="<?php 
echo $myAccountUrl;
?>
" class="btn btn-default"><?php 
_e('Go back to My account', 'jigoshop');
?>
</a>
	<button class="btn btn-success pull-right" name="action" value="change_password"><?php 
_e('Change password', 'jigoshop');
?>
</button>
</form>
Example #11
0
        if ($customer->getShippingAddress()->getCountry() && Country::hasStates($customer->getShippingAddress()->getCountry())) {
            ?>
											<?php 
            \Jigoshop\Helper\Forms::select(array('id' => 'noscript_state', 'name' => 'state', 'value' => $customer->getShippingAddress()->getState(), 'options' => Country::getStates($customer->getShippingAddress()->getCountry())));
            ?>
										<?php 
        } else {
            ?>
											<?php 
            \Jigoshop\Helper\Forms::text(array('id' => 'noscript_state', 'name' => 'state', 'value' => $customer->getShippingAddress()->getState()));
            ?>
										<?php 
        }
        ?>
										<?php 
        \Jigoshop\Helper\Forms::text(array('name' => 'postcode', 'value' => $customer->getShippingAddress()->getPostcode(), 'placeholder' => __('Postcode', 'jigoshop')));
        ?>
									</div>
								</div>
								<button name="action" value="update-shipping" class="btn btn-default pull-right" id="change-destination"><?php 
        _e('Change destination', 'jigoshop');
        ?>
</button>
							</td>
						</tr>
					<?php 
    }
    ?>
					<tr id="cart-subtotal">
						<th scope="row"><?php 
    _e('Subtotal', 'jigoshop');
Example #12
0
    ?>
" value="off" />
		<?php 
}
?>
		<input type="checkbox" id="<?php 
echo $id;
?>
" name="<?php 
echo $name;
?>
" class="<?php 
echo join(' ', $classes);
?>
" <?php 
echo Forms::checked($checked, true);
?>
 value="<?php 
echo $value;
?>
"<?php 
$disabled and print ' disabled';
?>
 />
		<?php 
if (!empty($description)) {
    ?>
			<label for="<?php 
    echo $id;
    ?>
"><span class="help"><?php 
Example #13
0
    echo $before_title . $title . $after_title;
}
?>
<form role="search" method="get" id="searchform" action="<?php 
echo home_url();
?>
">
	<div>
		<label class="assistive-text" for="s"><?php 
_e('Search for:', 'jigoshop');
?>
</label>
		<input type="text" value="<?php 
echo get_search_query();
?>
" name="s" id="s" placeholder="<?php 
_e('Search for products', 'jigoshop');
?>
" />
		<input type="submit" id="searchsubmit" value="<?php 
_e('Search', 'jigoshop');
?>
" />
		<input type="hidden" value="product" name="post_type"/>
		<?php 
\Jigoshop\Helper\Forms::printHiddenFields($fields, array('s', 'post_type'));
?>
	</div>
</form>
<?php 
echo $after_widget;
Example #14
0
 * @var $terms array List of available categories.
 * @var $current string Currently selected type.
 * @var $walker \Jigoshop\Web\CategoryWalker Walker for displaying categories.
 * @var $query array Query to fetch categories.
 */
//Forms::select(array(
//	'name' => Types::PRODUCT_CATEGORY,
//	'id' => 'dropdown_'.Types::PRODUCT_CATEGORY,
//	'value' => $current,
//	'options'
//));
?>
<select name="<?php 
echo Types::PRODUCT_CATEGORY;
?>
" id="dropdown_<?php 
echo Types::PRODUCT_CATEGORY;
?>
">
	<option value="" <?php 
echo Forms::selected($current, '');
?>
><?php 
_e('View all categories', 'jigoshop');
?>
</option>
	<?php 
echo $walker->walk($terms, 0, $query);
?>
</select>
Example #15
0
foreach ($product->getAssignedVariableAttributes() as $id => $attribute) {
    /** @var $attribute \Jigoshop\Entity\Product\Attribute */
    ?>
		<?php 
    \Jigoshop\Helper\Forms::select(array('name' => 'attributes[' . $id . ']', 'classes' => array('product-attribute'), 'label' => $attribute['label'], 'options' => $attribute['options'], 'placeholder' => __('Please select…', 'jigoshop')));
    ?>
	<?php 
}
?>
	<div id="add-to-cart-buttons">
		<p class="price"><?php 
_e('Current price:', 'jigoshop');
?>
 <span></span></p>
		<?php 
\Jigoshop\Helper\Forms::number(array('id' => 'product-quantity', 'name' => 'quantity', 'label' => __('Quantity', 'jigoshop'), 'value' => 1, 'min' => 1));
?>
		<input type="hidden" name="variation_id" id="variation-id" value="" />
		<button class="btn btn-primary" type="submit"><?php 
_e('Add to cart', 'jigoshop');
?>
</button>
	</div>
	<div id="add-to-cart-messages">
		<div class="alert alert-warning"><?php 
_e('Selected variation is not available.', 'jigoshop');
?>
</div>
	</div>
</form>
Example #16
0
/**
 * @var $types array List of available types.
 * @var $current string Currently selected type.
 */
?>
<select name="product_type" id="dropdown_product_type">
	<option value='0'><?php 
echo __('Show all types', 'jigoshop');
?>
</option>
	<?php 
foreach ($types as $type => $options) {
    ?>
	<option value="<?php 
    echo $type;
    ?>
" <?php 
    echo Forms::selected($type, $current);
    ?>
><?php 
    echo $options['label'];
    ?>
 (<?php 
    echo absint($options['count']);
    ?>
)</option>
	<?php 
}
?>
</select>
Example #17
0
">
	<div class="panel-heading">
		<h3 class="panel-title"><?php 
_e('Registration', 'jigoshop');
?>
</h3>
	</div>
	<div class="panel-body">
		<div class="row clearfix" >
			<?php 
Forms::text(array('label' => __('Username', 'jigoshop'), 'name' => 'jigoshop_account[login]', 'placeholder' => __('Enter username', 'jigoshop')));
?>
			<?php 
Forms::text(array('label' => __('Password', 'jigoshop'), 'type' => 'password', 'name' => 'jigoshop_account[password]', 'placeholder' => __('Your password', 'jigoshop')));
?>
			<?php 
Forms::text(array('label' => __('Re-type password', 'jigoshop'), 'type' => 'password', 'name' => 'jigoshop_account[password2]', 'placeholder' => __('Re-type your password', 'jigoshop')));
?>
			<?php 
if ($showRegistrationForm) {
    ?>
				<?php 
    Forms::checkbox(array('label' => __('I agree to account creation', 'jigoshop'), 'name' => 'jigoshop_account[create]', 'size' => 9));
    ?>
			<?php 
}
?>
		</div>
	</div>
</div>