Beispiel #1
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>
Beispiel #2
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>
Beispiel #3
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>
Beispiel #4
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>
Beispiel #5
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;