Ejemplo n.º 1
0
use Jigoshop\Helper\Product;
/**
 * @var $product \Jigoshop\Entity\Product\Variable Product to add.
 */
?>
<form action="" method="post" class="form" role="form">
	<input type="hidden" name="action" value="add-to-cart" />
	<?php 
do_action('jigoshop\\template\\product\\before_cart', $product);
?>
	<?php 
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');
Ejemplo n.º 2
0
\Jigoshop\Helper\Forms::text(array('name' => 'address[last_name]', 'label' => __('Last name', 'jigoshop'), 'value' => $address->getLastName()));
?>
	<?php 
\Jigoshop\Helper\Forms::text(array('name' => 'address[address]', 'label' => __('Address', 'jigoshop'), 'value' => $address->getAddress()));
?>
	<?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 
Ejemplo n.º 3
0
        ?>
"><span class="glyphicon glyphicon-remove"></span></button>
										</h3>
									</div>
									<div class="panel-body">
										<?php 
        \Jigoshop\Helper\Forms::select(array('name' => 'country', 'value' => $customer->getShippingAddress()->getCountry(), 'options' => Country::getAllowed()));
        ?>
										<?php 
        \Jigoshop\Helper\Forms::hidden(array('id' => 'state', 'name' => 'state', 'value' => $customer->getShippingAddress()->getState()));
        ?>
										<?php 
        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>