예제 #1
0
 protected function onAdd($tpl = null)
 {
     $app = JFactory::getApplication();
     JRequest::setVar('hidemainmenu', true);
     $model = $this->getModel();
     $this->item = $model->runMyBehaviorFlag(true)->getItem();
     $this->currency = J2Store::currency();
     $this->form_prefix = $this->input->getString('form_prefix', '');
     $this->product_source_view = $this->input->getString('product_source_view', 'article');
     $this->product_types = JHtml::_('select.genericlist', $model->getProductTypes(), $this->form_prefix . '[product_type]', array(), 'value', 'text', $this->item->product_type);
     if ($this->item->j2store_product_id) {
         //manufacturers
         $this->manufacturers = J2Html::select()->clearState()->type('genericlist')->name($this->form_prefix . '[manufacturer_id]')->value($this->item->manufacturer_id)->setPlaceHolders(array('' => JText::_('J2STORE_SELECT_OPTION')))->hasOne('Manufacturers')->setRelations(array('fields' => array('key' => 'j2store_manufacturer_id', 'name' => array('company'))))->getHtml();
         //vendor
         $this->vendors = J2Html::select()->clearState()->type('genericlist')->name($this->form_prefix . '[vendor_id]')->value($this->item->vendor_id)->setPlaceHolders(array('' => JText::_('J2STORE_SELECT_OPTION')))->hasOne('Vendors')->setRelations(array('fields' => array('key' => 'j2store_vendor_id', 'name' => array('first_name', 'last_name'))))->getHtml();
         //tax profiles
         $this->taxprofiles = J2Html::select()->clearState()->type('genericlist')->name($this->form_prefix . '[taxprofile_id]')->value($this->item->taxprofile_id)->setPlaceHolders(array('' => JText::_('J2STORE_NOT_TAXABLE')))->hasOne('Taxprofiles')->setRelations(array('fields' => array('key' => 'j2store_taxprofile_id', 'name' => 'taxprofile_name')))->getHtml();
     }
     if ($this->item->j2store_product_id > 0) {
         $this->product_filters = F0FTable::getAnInstance('ProductFilter', 'J2StoreTable')->getFiltersByProduct($this->item->j2store_product_id);
     } else {
         $this->product_filters = array();
     }
     return true;
 }
 public function getInput()
 {
     $model = F0FModel::getTmpInstance('Coupons', 'J2StoreModel');
     $list = $model->getCouponDiscountTypes();
     $attr = array();
     // Get the field options.
     // Initialize some field attributes.
     $attr['class'] = !empty($this->class) ? $this->class : '';
     // Initialize JavaScript field attributes.
     $attr['onchange'] = isset($this->onchange) ? $this->onchange : '';
     $attr['id'] = isset($this->id) ? $this->id : '';
     // generate country filter list
     return J2Html::select()->clearState()->type('genericlist')->name($this->name)->attribs($attr)->value($this->value)->setPlaceHolders($list)->getHtml();
 }
예제 #3
0
 public function getInput()
 {
     $model = F0FModel::getTmpInstance('Lengths', 'J2StoreModel');
     $list = $model->enabled(1)->getItemList();
     $attr = array();
     // Get the field options.
     // Initialize some field attributes.
     $attr['class'] = !empty($this->class) ? $this->class : '';
     // Initialize JavaScript field attributes.
     $attr['onchange'] = $this->onchange ? $this->onchange : '';
     //generate country filter list
     $options = array();
     foreach ($list as $row) {
         $options[$row->j2store_length_id] = JText::_($row->length_title);
     }
     return J2Html::select()->clearState()->type('genericlist')->name($this->name)->attribs($attr)->value($this->value)->setPlaceHolders($options)->getHtml();
 }
예제 #4
0
    public function getRepeatable()
    {
        $cont_saving = JText::_('J2STORE_SAVING_CHANGES') . '...';
        $html = '';
        $html .= '<div class="j2store-order-status-form">';
        $html .= JText::_("J2STORE_CHANGE_ORDER_STATUS");
        $html .= '<script type="text/javascript">
				function submitOrderState(id){
					(function($) {
							var order_state = $("#order_state_id_"+id).attr("value");
					var notify_customer = 0;
					if($("#notify_customer_"+id).is(":checked")) {
						notify_customer = 1;
					}
					$.ajax({
						url: "index.php?option=com_j2store&view=orders&task=orderstatesave",
						type: "post",
						data: {"id":id,"return":"orders","notify_customer":notify_customer,"order_state_id":order_state},
						dataType: "json",
						beforeSend: function() {
							$("#order-list-save_"+id).attr("disabled", true);
							$("#order-list-save_"+id).val("$cont_saving");
						},
						success: function(json) {
							if(json["success"]){
								if(json["success"]["link"]){
									window.location =json["success"]["link"];
								}
							}
						}
					});
					})(j2store.jQuery);
			};
		</script>';
        $html .= J2Html::select()->clearState()->type('genericlist')->name('order_state_id')->value($this->item->order_state_id)->idTag("order_state_id_" . $this->item->j2store_order_id)->setPlaceHolders(array('' => JText::_('J2STORE_SELECT_OPTION')))->hasOne('Orderstatuses')->setRelations(array('fields' => array('key' => 'j2store_orderstatus_id', 'name' => 'orderstatus_name')))->getHtml();
        $html .= "<label><input type='checkbox' name='notify_customer' id='notify_customer_.{$this->item}->j2store_order_id.' value='1' />";
        $html .= JText::_('J2STORE_NOTIFY_CUSTOMER');
        $html .= '</label>';
        //$html .='<input type="hidden" name="j2store_order_id" value="'.$this->item->j2store_order_id.'" />';
        $html .= '<input type="hidden" name="return" value="orders" />';
        $html .= '<input class="btn btn-primary btn-small" id="order-list-save_' . $this->item->j2store_order_id . ' type="button" onclick="submitOrderState(' . $this->item->j2store_order_id . ')"	value="' . JText::_('J2STORE_ORDER_STATUS_SAVE') . '" />';
        $html .= '</div>';
        return $html;
    }
예제 #5
0
 public function getInput()
 {
     $model = F0FModel::getTmpInstance('Orderstatuses', 'J2StoreModel');
     $orderlist = $model->getItemList();
     $attr = '';
     // Get the field options.
     // Initialize some field attributes.
     $attr['class'] = !empty($this->class) ? $this->class : '';
     $attr['size'] = !empty($this->size) ? $this->size : '';
     $attr['multiple'] = $this->multiple ? 'multiple' : '';
     $attr['required'] = $this->required ? true : false;
     $attr['autofocus'] = $this->autofocus ? 'autofocus' : '';
     // Initialize JavaScript field attributes.
     $attr['onchange'] = $this->onchange ? $this->onchange : '';
     //generate country filter list
     $orderstatus_options = array();
     $orderstatus_options['*'] = JText::_('JALL');
     foreach ($orderlist as $row) {
         $orderstatus_options[$row->j2store_orderstatus_id] = JText::_($row->orderstatus_name);
     }
     return J2Html::select()->clearState()->type('genericlist')->name($this->name)->attribs($attr)->value($this->value)->setPlaceHolders($orderstatus_options)->getHtml();
 }
예제 #6
0
?>
</h5>
	<div class="row-fluid">
		<table class="adminlist table table-striped">
			<tr>
				<td>
					<?php 
echo J2Html::label(JText::_('JCATEGORY'));
?>
					<?php 
$catlist = array();
$catlist[''] = JText::_('J2STORE_SELECT_OPTION');
foreach ($this->categories as $key => $value) {
    $catlist[$value->value] = $value->text;
}
echo J2Html::select()->clearState()->type('genericlist')->idTag('catid')->attribs(array('onchange' => 'this.form.submit();'))->setPlaceholders($catlist)->name('filter_category')->value($this->state->get('filter_category', ''))->getHtml();
?>
				</td>
				<td>
					<?php 
echo $this->pagination->getLimitBox();
?>
				</td>
			<tr>
		</table>
		<table class="table table-striped">
			<thead>
				<tr>
					<th>
						<input class="btn btn-success" id="setAllProductsBnt" type="button" value="<?php 
echo JText::_('J2STORE_SET');
예제 #7
0
/**
 * @package J2Store
 * @copyright Copyright (c)2014-17 Ramesh Elamathi / J2Store.org
 * @license GNU GPL v3 or later
 */
// No direct access to this file
defined('_JEXEC') or die;
require_once JPATH_ADMINISTRATOR . '/components/com_j2store/library/popup.php';
//lengths
$this->lengths = J2Html::select()->clearState()->type('genericlist')->name($this->form_prefix . '[length_class_id]')->value($this->item->length_class_id)->setPlaceHolders(array('' => JText::_('J2STORE_SELECT_OPTION')))->hasOne('Lengths')->setRelations(array('fields' => array('key' => 'j2store_length_id', 'name' => 'length_title')))->getHtml();
//weights
$this->weights = J2Html::select()->clearState()->type('genericlist')->name($this->form_prefix . '[weight_class_id]')->value($this->item->weight_class_id)->setPlaceHolders(array('' => JText::_('J2STORE_SELECT_OPTION')))->hasOne('Weights')->setRelations(array('fields' => array('key' => 'j2store_weight_id', 'name' => 'weight_title')))->getHtml();
//backorder
$this->allow_backorder = J2Html::select()->clearState()->type('genericlist')->name($this->form_prefix . '[allow_backorder]')->value($this->item->allow_backorder)->setPlaceHolders(array('0' => JText::_('COM_J2STORE_DO_NOT_ALLOW_BACKORDER'), '1' => JText::_('COM_J2STORE_DO_ALLOW_BACKORDER'), '2' => JText::_('COM_J2STORE_ALLOW_BUT_NOTIFY_CUSTOMER')))->getHtml();
$this->availability = J2Html::select()->clearState()->type('genericlist')->name($this->form_prefix . '[availability]')->value($this->item->availability)->default(1)->setPlaceHolders(array('0' => JText::_('COM_J2STORE_PRODUCT_OUT_OF_STOCK'), '1' => JText::_('COM_J2STORE_PRODUCT_IN_STOCK')))->getHtml();
?>
 <form class="form-horizontal form-validate" id="adminForm" name="adminForm" method="post" action="index.php">
 	<h4><?php 
echo JText::_('J2STORE_PRODUCT_NAME');
?>
</h4>
<div class="j2store-bs">
			<div class="tabbable  tabs-left">
				<ul class="nav nav-tabs" data-tabs="tabs">
					<li class="active">
				    	<a href="#generalTab" data-toggle="tab">
				  			<?php 
echo JText::_('J2STORE_PRODUCT_TAB_GENERAL');
?>
				   		 </a>
예제 #8
0
echo J2Html::button('go', JText::_('J2STORE_FILTER_GO'), array('class' => 'btn btn-success', 'onclick' => 'this.form.submit();'));
?>
			<?php 
echo J2Html::button('reset', JText::_('J2STORE_FILTER_RESET'), array('id' => 'reset-filter-search', 'class' => 'btn btn-inverse', "onclick" => "jQuery('#search').attr('value','');this.form.submit();"));
?>
			</div>
		</td>
		<td>
			<div class="input-prepend">
				<span class="add-on">
					<?php 
echo J2html::label(JText::_('J2STORE_PRODUCT_TYPE'), 'product_type', array('class' => 'control-label'));
?>
				</span>
				<?php 
echo J2Html::select()->clearState()->type('genericlist')->name('product_type')->attribs(array('class' => 'input-small j2store-product-filters', 'onchange' => 'this.form.submit();'))->value($this->state->product_type)->setPlaceHolders($this->product_types)->getHtml();
?>
				</div>
		</td>
		<td>
			<?php 
echo J2Html::button('reset', JText::_('J2STORE_FILTER_RESET_ALL'), array('id' => 'reset-all-filter', 'class' => 'btn btn-danger', 'onclick' => 'j2storeResetAllFilters();'));
?>
		</td>
		<td>
			<?php 
if ($this->state->since || $this->state->until || $this->state->visible || $this->state->taxprofile_id || $this->state->vendor_id || $this->state->manufacturer_id || $this->state->productid_from || $this->state->productid_to || $this->state->pricefrom || $this->state->priceto || $this->state->visible) {
    ?>
						<input id="hideBtnAdvancedControl" class="btn btn-inverse" type="button" onclick="jQuery('#advanced-search-controls').toggle('click');jQuery(this).toggle('click');jQuery('#showBtnAdvancedControl').toggle('click');" value="<?php 
    echo JText::_('J2STORE_HIDE_FILTER_ADVANCED');
    ?>
예제 #9
0
												</tr>
						<?php 
    }
}
?>
								<tr>
									<td><?php 
echo J2Html::text('field_values[title][]', '', array('class' => 'input'));
?>
</td>
									<td><?php 
echo J2Html::text('field_values[value][]', '', array('class' => 'input'));
?>
</td>
									<td><?php 
echo J2Html::select()->clearState()->type('genericlist')->name('field_values[disabled][]')->value(0)->setPlaceholders(array('0' => JText::_('J2STORE_NO'), '1' => JText::_('J2STORE_YES')))->getHtml();
?>
									</td>
								</tr>
							</tbody>
						</table>
					</td>
				</tr>
				<tr class="filtering">
					<td class="key"><?php 
echo JText::_('J2STORE_CUSTOM_FIELD_INPUT_FILTERING');
?>
</td>
					<td><?php 
echo JHTML::_('select.booleanlist', "field_options[filtering]", '');
?>
예제 #10
0
<?php

/**
 * @package J2Store
 * @copyright Copyright (c)2014-17 Ramesh Elamathi / J2Store.org
 * @license GNU GPL v3 or later
 */
// No direct access
defined('_JEXEC') or die;
//pricing options
$pricing_calculator = J2Html::select()->clearState()->type('genericlist')->name($this->form_prefix . '[pricing_calculator]')->value($this->variant->pricing_calculator)->setPlaceHolders(array('standard' => JText::_('COM_J2STORE_PRODUCT_PRICING_CALCULATOR_STANDARD')))->getHtml();
?>

<div class="j2store-product-pricing">
	<div class="control-group">
		<?php 
echo J2Html::label(JText::_('J2STORE_PRODUCT_REGULAR_PRICE'), 'price', array('class' => 'control-label'));
?>
		<?php 
echo J2Html::price($this->form_prefix . '[price]', $this->variant->price, array('class' => 'input'));
?>
	</div>
	<div class="control-group">
		<?php 
echo J2Html::label(JText::_('J2STORE_PRODUCT_SET_ADVANCED_PRICING'), 'sale_price', array('class' => 'control-label'));
?>
		<!-- Link to advanced pricing options. Opens as a popup. -->
		<?php 
echo J2StorePopup::popup("index.php?option=com_j2store&view=products&task=setproductprice&variant_id=" . $this->variant->j2store_variant_id . "&layout=productpricing&tmpl=component", JText::_("J2STORE_PRODUCT_SET_PRICES"), array('class' => 'btn btn-success'));
?>
	</div>
예제 #11
0
        echo $row->orderstatus_cssclass;
        ?>
 order-state-label">
						<?php 
        echo JText::_($row->orderstatus_name);
        ?>
						</span>
					</p>
						<?php 
        echo JText::_("J2STORE_CHANGE_ORDER_STATUS");
        ?>
						<?php 
        $attr = array("class" => "input-small", "id" => "order_state_id_" . $row->j2store_order_id);
        ?>
						<?php 
        echo J2Html::select()->clearState()->type('genericlist')->name('order_state_id')->value($row->order_state_id)->idTag('order_state_id_' . $row->j2store_order_id)->attribs($attr)->setPlaceHolders(array('' => JText::_('J2STORE_SELECT_OPTION')))->hasOne('Orderstatuses')->setRelations(array('fields' => array('key' => 'j2store_orderstatus_id', 'name' => 'orderstatus_name')))->getHtml();
        ?>
						<label>
						<input type="checkbox" name="notify_customer" id="notify_customer_<?php 
        echo $row->j2store_order_id;
        ?>
" value="1" />
							<?php 
        echo JText::_('J2STORE_NOTIFY_CUSTOMER');
        ?>
						</label>
						<input type="hidden" name="return" value="orders" />
						<input class="btn btn-primary" id="order-list-save_<?php 
        echo $row->j2store_order_id;
        ?>
" type="button" onclick="submitOrderState(<?php 
		<?php 
    echo J2Html::hidden($this->form_prefix . '[quantity][j2store_productquantity_id]', $this->item->j2store_productquantity_id, array('class' => 'input '));
    ?>
		<?php 
    echo J2Html::text($this->form_prefix . '[quantity][quantity]', $this->item->quantity, array('class' => 'input '));
    ?>
	</div>

	<div class="control-group">
		<?php 
    echo J2Html::label(JText::_('J2STORE_PRODUCT_ALLOW_BACK_ORDERS'), 'allow_backorder', array('class' => 'control-label'));
    ?>
		<?php 
    //three select options: Do not allow, allow, but notify customer, allow
    // Radio Btn Displaying
    echo J2Html::select()->clearState()->type('genericlist')->name($this->form_prefix . '[allow_backorder]')->value($this->item->allow_backorder)->setPlaceHolders(array('0' => JText::_('COM_J2STORE_DO_NOT_ALLOW_BACKORDER'), '1' => JText::_('COM_J2STORE_DO_ALLOW_BACKORDER'), '2' => JText::_('COM_J2STORE_ALLOW_BUT_NOTIFY_CUSTOMER')))->getHtml();
    ?>
	</div>

	<div class="control-group">
		<?php 
    echo J2Html::label(JText::_('J2STORE_PRODUCT_STOCK_STATUS'), 'availability', array('class' => 'control-label'));
    ?>
		<?php 
    //two select options: In Stock, Out of stock
    ?>
		<?php 
    echo $this->availability;
    ?>
		</div>
		<div class="control-group">
예제 #13
0
        ?>
					<tbody id="zone-to-geo-zone-row<?php 
        echo $zone_to_geo_zone_row;
        ?>
">
					   <tr>
				           <td class="left">
						  <?php 
        $attr = array("onchange" => "getZones({$zone_to_geo_zone_row},this.value)");
        /* 	$option =array();
        									foreach($this->item->countryList as $clist){
        										$option [] = JHtml::_('select.option',$clist->j2store_country_id,$clist->country_name);
        									}
        									echo JHTML::_('select.genericlist', $option, 'zone_to_geo_zone['.$zone_to_geo_zone_row.'][country_id]',$attr, 'value', 'text',$geozonerule->country_id);
         */
        echo J2Html::select()->clearState()->type('genericlist')->name('zone_to_geo_zone[' . $zone_to_geo_zone_row . '][country_id]')->value($geozonerule->country_id)->attribs($attr)->setPlaceHolders(array('' => JText::_('J2STORE_SELECT_OPTION')))->hasOne('Countries')->setRelations(array('fields' => array('key' => 'j2store_country_id', 'name' => array('country_name'))))->getHtml();
        ?>
				           </td>
			               <td class="left">
			                <select name="zone_to_geo_zone[<?php 
        echo $zone_to_geo_zone_row;
        ?>
][zone_id]" id="zone<?php 
        echo $zone_to_geo_zone_row;
        ?>
">
			                </select>
			                <?php 
        echo J2Html::hidden('zone_to_geo_zone[' . $zone_to_geo_zone_row . '][j2store_geozonerule_id]', $geozonerule->j2store_geozonerule_id);
        ?>
			               </td>
예제 #14
0
 /**
  * ACL check before editing a record; override to customise
  *
  * @return  boolean  True to allow the method to run
  */
 protected function onBeforeEdit()
 {
     if (parent::onBeforeEdit()) {
         $task = $this->input->getString('task');
         if ($task == 'edit') {
             $view = $this->getThisView();
             $this->form_prefix = $this->input->getString('form_prefix');
             // Get/Create the model
             if ($model = $this->getThisModel()) {
                 // Push the model into the view (as default)
                 $view->setModel($model, true);
             }
             // Set the layout
             $view->setLayout(is_null($this->layout) ? 'default' : $this->layout);
             if ($task == 'edit') {
                 $this->item = $model->runMyBehaviorFlag(true)->getItem();
                 $view->item = $this->item;
                 $view->setLayout('form');
                 $view->addTemplatePath(JPATH_ADMINISTRATOR . '/components/com_j2store/views/product/tmpl/');
                 $view->set('form_prefix', $this->form_prefix);
                 $view->product_types = JHtml::_('select.genericlist', $model->getProductTypes(), $this->form_prefix . '[product_type]', array(), 'value', 'text', $this->item->product_type);
                 $view->manufacturers = J2Html::select()->clearState()->type('genericlist')->name($this->form_prefix . '[manufacturer_id]')->value($this->item->manufacturer_id)->setPlaceHolders(array('' => JText::_('J2STORE_SELECT_OPTION')))->hasOne('Manufacturers')->setRelations(array('fields' => array('key' => 'j2store_manufacturer_id', 'name' => array('company'))))->getHtml();
                 //vendor
                 $view->vendors = J2Html::select()->clearState()->type('genericlist')->name($this->form_prefix . '[vendor_id]')->value($this->item->vendor_id)->setPlaceHolders(array('' => JText::_('J2STORE_SELECT_OPTION')))->hasOne('Vendors')->setRelations(array('fields' => array('key' => 'j2store_vendor_id', 'name' => array('first_name', 'last_name'))))->getHtml();
                 //tax profiles
                 $view->taxprofiles = J2Html::select()->clearState()->type('genericlist')->name($this->form_prefix . '[taxprofile_id]')->value($this->item->taxprofile_id)->setPlaceHolders(array('' => JText::_('J2STORE_NOT_TAXABLE')))->hasOne('Taxprofiles')->setRelations(array('fields' => array('key' => 'j2store_taxprofile_id', 'name' => 'taxprofile_name')))->getHtml();
                 $view->item->price_calculator = isset($this->item->price_calculator) && !empty($this->item->price_calculator) ? $this->item->price_calculator : 'standard';
                 //pricing options
                 $view->pricing_calculator = J2Html::select()->clearState()->type('genericlist')->name($this->form_prefix . '[pricing_calculator]')->value($this->item->price_calculator)->setPlaceHolders(J2Store::product()->getPricingCalculators())->getHtml();
                 $view->product_filters = F0FTable::getAnInstance('ProductFilter', 'J2StoreTable')->getFiltersByProduct($this->item->j2store_product_id);
             }
         } elseif ($task == 'setproductprice') {
             $this->setproductprice();
         }
         //$this->$task();
         return true;
     }
     return false;
 }
예제 #15
0
					<?php 
echo J2Html::label(JText::_('J2STORE_STORE_CURRENCY_AUTO_UPDATE_CURRENCY'), 'config_currency_auto', array('class' => 'control-label'));
?>
					<div class="controls">
					<?php 
echo J2Html::select()->clearState()->type('genericlist')->name('config_currency_auto')->value($this->params->get('config_currency_auto', 1))->setPlaceHolders(array('0' => JText::_('JNO'), '1' => JText::_('JYES')))->getHtml();
?>
					</div>
				</div>

				<div class="control-group">
					<?php 
echo J2Html::label(JText::_('J2STORE_PRODUCT_WEIGHT_CLASS'), 'config_weight_class_id', array('class' => 'control-label'));
?>
					<div class="controls">
					<?php 
echo J2Html::select()->clearState()->type('genericlist')->name('config_weight_class_id')->value($this->params->get('config_weight_class_id', 1))->setPlaceHolders(array('' => JText::_('J2STORE_SELECT_OPTION')))->hasOne('Weights')->setRelations(array('fields' => array('key' => 'j2store_weight_id', 'name' => 'weight_title')))->getHtml();
?>
					</div>
				</div>

				<div class="control-group">
					<?php 
echo J2Html::label(JText::_('J2STORE_PRODUCT_LENGTH_CLASS'), 'config_length_class_id', array('class' => 'control-label'));
?>
					<div class="controls">
					<?php 
echo J2Html::select()->clearState()->type('genericlist')->name('config_length_class_id')->value($this->params->get('config_length_class_id', 1))->setPlaceHolders(array('' => JText::_('J2STORE_SELECT_OPTION')))->hasOne('Lengths')->setRelations(array('fields' => array('key' => 'j2store_length_id', 'name' => 'length_title')))->getHtml();
?>
					</div>
				</div>
            $singleitem->parent_optionvalue = explode(',', $singleitem->parent_optionvalue);
            ?>
					<?php 
            echo J2Html::select()->clearState()->type('genericlist')->name('parent_optionvalue[]')->value($singleitem->parent_optionvalue)->setPlaceHolders($parentOpvalues)->attribs(array('class' => 'input-small', 'multiple' => true))->getHtml();
            //echo JHtml::_('select.genericlist', $this->parentopvalue_array, 'parent_optionvalue[]', array('class'=>'input-small' ,'multiple'=>true ,'id'=> 'parent_optionvalue'), 'value', 'text',$singleitem->parent_optionvalue);
            ?>
					</td>
				</tr>
				<?php 
        }
        ?>

			<?php 
    } else {
        ?>
			<tr>
				<td colspan="2">
					<?php 
        echo J2Html::select()->clearState()->type('genericlist')->name('parent_optionvalue[]')->value()->setPlaceHolders($parentOpvalues)->attribs(array('class' => 'input-small', 'multiple' => true))->getHtml();
        ?>
				</td>
			</tr>
			<?php 
    }
    ?>
			</tbody>
			<?php 
}
?>
		</table>
</div>
예제 #17
0
            if (isset($poption->parent_id) && !empty($poption->parent_id)) {
                ?>
								<?php 
                echo J2StorePopup::popup("index.php?option=com_j2store&view=products&task=setparentoptionvalues&productoption_id=" . $poption->j2store_productoption_id . "&layout=parentproductopvalues&tmpl=component", JText::_("J2STORE_OPTION_PARENT_OPTION_VALUES"), array());
                ?>
							<?php 
            }
            ?>
							<?php 
        }
        ?>
						</td>

					<td>
					<?php 
        echo J2Html::select()->clearState()->type('genericlist')->name($this->form_prefix . '[item_options][' . $poption->j2store_productoption_id . '][required]')->value($poption->required)->setPlaceHolders(array('0' => JText::_('J2STORE_NO'), '1' => JText::_('J2STORE_YES')))->attribs(array('class' => 'input-small'))->getHtml();
        ?>

					</td>
					<td>
						<span class="optionRemove" onClick="removePAOption(<?php 
        echo $poption->j2store_productoption_id;
        ?>
)">X</span>
					</td>
				</tr>
				<?php 
        $key++;
        ?>
				<?php 
    }
            echo JText::_('J2STORE_PRODUCT_USE_STORE_CONFIGURATION');
            ?>
											</label>
										</div>
									</div>

									<div class="control-group">
										<?php 
            echo J2Html::label(JText::_('J2STORE_PRODUCT_QUANTITY_RESTRICTION'), 'quantity_restriction', array('class' => 'control-label'));
            ?>
										<?php 
            // echo J2Html::radio($prefix.'[quantity_restriction]', $this->variant->quantity_restriction, array('class'=>'controls'));
            ?>
										<?php 
            //pricing options
            echo J2Html::select()->clearState()->type('genericlist')->name($prefix . '[quantity_restriction]')->value($this->variant->quantity_restriction)->attribs(array('id' => 'quantity_restriction_' . $this->variant->j2store_variant_id, 'class' => 'input-small'))->setPlaceHolders(array(1 => JText::_('J2STORE_YES'), 0 => JText::_('J2STORE_NO')))->getHtml();
            ?>
									</div>

									<div class="control-group form-inline">
										<?php 
            echo J2Html::label(JText::_('J2STORE_PRODUCT_MAX_SALE_QUANTITY'), 'max_sale_qty', array('class' => 'control-label'));
            ?>
										<?php 
            $attribs = isset($this->variant->use_store_config_max_sale_qty) && !empty($this->variant->use_store_config_max_sale_qty) ? array('id' => 'max_sale_qty_' . $this->variant->j2store_variant_id, 'disabled' => 'disabled') : array('id' => 'max_sale_qty_' . $this->variant->j2store_variant_id);
            echo J2Html::text($prefix . '[max_sale_qty]', $this->variant->max_sale_qty, $attribs);
            ?>
										<div class="store_config_max_sale_qty">
											<label class="control-label">
												<input id="store_config_max_sale_qty_<?php 
            echo $this->variant->j2store_variant_id;
예제 #19
0
    ?>
			 <tr class='row<?php 
    echo $k;
    ?>
'>
				<td style="text-align: center;">
					<?php 
    echo $checked;
    ?>
				</td>
	           	<td>
	           		<?php 
    echo J2html::hidden('standardrates[' . $item->j2store_shippingrate_id . '][j2store_shippingrate_id]', $item->j2store_shippingrate_id);
    ?>
           			<?php 
    echo J2Html::select()->clearState()->type('genericlist')->name('standardrates[' . $item->j2store_shippingrate_id . '][geozone_id]')->value($item->geozone_id)->hasOne('Geozones')->setRelations(array('fields' => array('key' => 'j2store_geozone_id', 'name' => array('geozone_name'))))->getHtml();
    ?>
              		<?php 
    echo J2Html::hidden('standardrates[' . $item->j2store_shippingrate_id . '][shippingmethod_id]', $sid);
    ?>
            	</td>
            	 	<?php 
    if ($row->shipping_method_type == 1 || $row->shipping_method_type == 2 || $row->shipping_method_type == 4 || $row->shipping_method_type == 5) {
        ?>
            	<td>
            		<?php 
        echo J2Html::text('standardrates[' . $item->j2store_shippingrate_id . '][shipping_rate_weight_start]', $item->shipping_rate_weight_start);
        ?>
            		<?php 
        echo JText::_("J2STORE_TO");
        ?>
예제 #20
0
    echo JText::_('J2STORE_CART_TAX_SHIPPING_CALCULATOR_HEADING');
    ?>
</label>
<div id="shipping" class="content" style="display:none;">
<form action="<?php 
    echo JRoute::_('index.php');
    ?>
" method="post" id="shipping-estimate-form" >
      <table>
        <tr>
          <td><span class="required">*</span> <?php 
    echo JText::_('J2STORE_SELECT_A_COUNTRY');
    ?>
</td>
          <td><?php 
    $countryList = J2Html::select()->clearState()->type('genericlist')->name('country_id')->idTag('estimate_country_id')->value($this->country_id)->setPlaceHolders(array('' => JText::_('J2STORE_SELECT_OPTION')))->hasOne('Countries')->setRelations(array('fields' => array('key' => 'j2store_country_id', 'name' => 'country_name')))->getHtml();
    echo $countryList;
    ?>
          </td>
        </tr>
        <tr>
          <td><span class="required">*</span> <?php 
    echo JText::_('J2STORE_STATE_PROVINCE');
    ?>
</td>
          <td><select id="estimate_zone_id" name="zone_id">
            </select></td>
        </tr>
        <tr>
          <td>
          <?php 
예제 #21
0
 * @license GNU GPL v3 or later
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHTML::_('behavior.modal');
?>
<div class="row-fluid">
	<div class="span12">
		<table class="adminlist table table-striped table-condensed">
			<tr>
				<td>
					<?php 
echo JText::_('J2STORE_COUNTRY');
?>
					<?php 
echo J2Html::select()->clearState()->type('genericlist')->name('country_id')->value($this->state->country_id)->attribs(array('onchange' => 'this.form.submit();'))->setPlaceHolders(array('' => JText::_('J2STORE_SELECT_OPTION')))->hasOne('Countries')->setRelations(array('fields' => array('key' => 'j2store_country_id', 'name' => array('country_name'))))->getHtml();
?>
				</td>
				<td>
					<input class="btn btn-success" type="button" value="<?php 
echo JText::_('J2STORE_IMPORT_COUNTRIES');
?>
" onclick="if (document.adminForm.boxchecked.value==0){alert('Please first make a selection from the list');}else{jQuery('#view').attr('value','geozones');jQuery('#task').attr('value','importzone');this.form.submit();}" />
				</td>
				<td>
					<?php 
echo $this->pagination->getLimitBox();
?>
				</td>
			</tr>
		</table>
예제 #22
0
파일: product.php 프로젝트: afend/RULug
 public function getPriceModifierHtml($name, $value = '', $default = '+')
 {
     if (empty($value)) {
         $value = $default;
     }
     $modifiers = $this->getPriceModifiers();
     $html = J2Html::select()->clearState()->type('genericlist')->name($name)->value($value)->setPlaceHolders($modifiers)->attribs(array('class' => 'input-small'))->getHtml();
     return $html;
 }
예제 #23
0
?>
:
				<?php 
$search = htmlspecialchars($this->state->search);
?>
				<?php 
echo J2Html::text('search', $search, array('id' => 'search', 'class' => 'input j2store-order-filters'));
?>
				<?php 
echo J2Html::button('go', JText::_('J2STORE_FILTER_GO'), array('class' => 'btn btn-success', 'onclick' => 'this.form.submit();'));
?>
				<?php 
echo J2Html::button('reset', JText::_('J2STORE_FILTER_RESET'), array('id' => 'reset-filter-search', 'class' => 'btn btn-inverse'));
?>
			</td>

			<td nowrap="nowrap">
			<?php 
echo JText::_('J2STORE_FILTER_ORDER_STATUS');
?>
:
			<?php 
echo J2Html::select()->type('genericlist')->name('orderstate')->value($this->state->orderstate)->attribs(array('onchange' => 'this.form.submit();', 'class' => 'input j2store-order-filters'))->setPlaceHolders(array('' => JText::_('J2STORE_SELECT_OPTION')))->hasOne('Orderstatuses')->ordering('ordering')->setRelations(array('fields' => array('key' => 'j2store_orderstatus_id', 'name' => 'orderstatus_name')))->getHtml();
?>
			</td>
			<td><?php 
echo $this->pagination->getLimitBox();
?>
</td>
		</tr>
		</table>
예제 #24
0
<?php

/**
 * @package J2Store
 * @copyright Copyright (c)2014-17 Ramesh Elamathi / J2Store.org
 * @license GNU GPL v3 or later
 */
// No direct access
defined('_JEXEC') or die;
//pricing options
$pricing_calculator = J2Html::select()->clearState()->type('genericlist')->name($this->form_prefix . '[pricing_calculator]')->value($this->variant->pricing_calculator)->setPlaceHolders(J2Store::product()->getPricingCalculators())->getHtml();
?>

<div class="j2store-product-pricing">
	<div class="control-group">
		<?php 
echo J2Html::label(JText::_('J2STORE_PRODUCT_REGULAR_PRICE'), 'price', array('class' => 'control-label'));
?>
		<?php 
echo J2Html::price($this->form_prefix . '[price]', $this->variant->price, array('class' => 'input'));
?>
	</div>
	<div class="control-group">
		<?php 
echo J2Html::label(JText::_('J2STORE_PRODUCT_SET_ADVANCED_PRICING'), 'sale_price', array('class' => 'control-label'));
?>
		<!-- Link to advanced pricing options. Opens as a popup. -->
		<?php 
echo J2StorePopup::popup("index.php?option=com_j2store&view=products&task=setproductprice&variant_id=" . $this->variant->j2store_variant_id . "&layout=productpricing&tmpl=component", JText::_("J2STORE_PRODUCT_SET_PRICES"), array('class' => 'btn btn-success'));
?>
	</div>
예제 #25
0
				<input  type="button" value="<?php 
    echo JText::_('J2STORE_FILTER_RESET');
    ?>
"
							class="btn btn-inverse"
						    onclick="resetJ2storeFilter();" />

        <?php 
}
?>
		<!-- Sorting -->
   		<?php 
if ($this->params->get('list_show_filter_sorting')) {
    ?>
		<?php 
    echo J2Html::select()->clearState()->type('genericlist')->name('sortby')->attribs(array('class' => 'input', 'onchange' => 'jQuery(this.form).submit()'))->value($this->state->sortby)->setPlaceHolders($this->filters['sorting'])->getHtml();
    ?>
		<?php 
}
?>

	<?php 
echo J2Html::hidden('option', 'com_j2store');
?>
	<?php 
echo J2Html::hidden('view', 'products');
?>
	<?php 
echo J2Html::hidden('task', 'browse');
?>
	<?php 
                ?>

							<td>
								<?php 
                echo J2Store::product()->getPriceModifierHtml($this->prefix . '[' . $poptionvalue->j2store_product_optionvalue_id . '][product_optionvalue_prefix]', $poptionvalue->product_optionvalue_prefix);
                ?>
							</td>

							<td>
								<?php 
                echo J2Html::text($this->prefix . '[' . $poptionvalue->j2store_product_optionvalue_id . '][product_optionvalue_price]', $poptionvalue->product_optionvalue_price, array('id' => 'product_optionvalue_price', 'class' => 'input-small'));
                ?>
							</td>
							<td>
							<?php 
                echo J2Html::select()->clearState()->type('genericlist')->name($this->prefix . '[' . $poptionvalue->j2store_product_optionvalue_id . '][product_optionvalue_weight_prefix]')->value($poptionvalue->product_optionvalue_weight_prefix)->setPlaceHolders(array('+' => '+', '-' => '-'))->attribs(array('class' => 'input-small'))->getHtml();
                ?>
							</td>

							<td>
								<?php 
                echo J2Html::text($this->prefix . '[' . $poptionvalue->j2store_product_optionvalue_id . '][product_optionvalue_weight]', $poptionvalue->product_optionvalue_weight, array('id' => 'product_optionvalue_weight', 'class' => 'input-small'));
                ?>
							</td>

					<?php 
                if ($this->product->product_type == 'simple') {
                    ?>
						<td>
								<?php 
                    echo JHtml::_('jgrid.isdefault', $poptionvalue->product_optionvalue_default, $key, "", $canChange, 'cb');
예제 #27
0
 function getInput()
 {
     return J2Html::select()->clearState()->type('genericlist')->name($this->name)->value($this->value)->attribs(array('multiple' => true))->setPlaceHolders(array('*' => JText::_('J2STORE_SELECT_ALL')))->hasOne('Geozones')->setRelations(array('fields' => array('key' => 'j2store_geozone_id', 'name' => array('geozone_name'))))->getHtml();
 }
예제 #28
0
/**
 * @package J2Store
 * @copyright Copyright (c)2014-17 Ramesh Elamathi / J2Store.org
 * @license GNU GPL v3 or later
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
<div class="control-group">
					<?php 
echo J2Html::label(JText::_('J2STORE_CONF_INCLUDING_TAX_LABEL'), 'config_currency_auto', array('class' => 'control-label'));
?>
					<span class="required">*</span>
					<div class="controls">
					<?php 
echo J2Html::select()->clearState()->type('genericlist')->name('config_including_tax')->idTag('config_including_tax')->value($this->params->get('config_including_tax', 0))->setPlaceHolders(array('0' => JText::_('J2STORE_PRICES_EXCLUDING_TAXES'), '1' => JText::_('J2STORE_PRICES_INCLUDING_TAXES')))->getHtml();
?>
					<small><?php 
echo JText::_('J2STORE_CONF_INCLUDING_TAX_DESC');
?>
</small>
					</div>
				</div>
				
				<div class="control-group">
					<?php 
echo J2Html::label(JText::_('J2STORE_DEFAULT_TAX_RATE'), 'tax_rate', array('class' => 'control-label'));
?>
					<div class="controls">
					<?php 
echo J2Html::text('tax_rate', '');
							<input type="hidden" onchange="j2storeGetAddress()" name="user_id" value="" id="jform_user_id" class="j2store-order-filters"  readonly="true"/>
							<?php 
$url = 'index.php?option=com_users&view=users&layout=modal&tmpl=component&field=jform_user_id';
?>
							<?php 
echo J2StorePopup::popup($url, '<i class="icon icon-user"></i>', array('class' => 'btn btn-primary modal_jform_created_by'));
?>
							</div>
						</div>
						<td>
						<?php 
echo JText::_('J2STORE_FILTER_PAYMENTS');
?>
:
							<?php 
echo J2Html::select()->clearState()->type('genericlist')->name('paykey')->value($this->state->paykey)->attribs(array('onchange' => 'this.form.submit', 'class' => 'j2store-order-filters'))->setPlaceHolders(array('' => JText::_('J2STORE_SELECT_OPTION')))->hasOne('Payments')->setRelations(array('fields' => array('key' => 'element', 'name' => 'element')))->getHtml();
?>
						</td>
						</tr>
						<tr>
						<td colspan="2">
							<?php 
echo J2Html::button('advanced_search', JText::_('J2STORE_APPLY_FILTER'), array('class' => 'btn btn-success', 'onclick' => 'this.form.submit();'));
?>
							<?php 
echo J2Html::button('reset_advanced_filters', JText::_('J2STORE_FILTER_RESET'), array('class' => 'btn btn-inverse', 'onclick' => 'resetAdvancedFilters()'));
?>
						</td>
					</tr>
				</table>
			</div>
예제 #30
0
 public static function geozones($default, $name)
 {
     return J2Html::select()->clearState()->type('genericlist')->name($name)->value($default)->setPlaceHolders(array('' => JText::_('J2STORE_SELECT_OPTION')))->hasOne('Geozones')->setRelations(array('fields' => array('key' => 'j2store_geozone_id', 'name' => array('geozone_name'))))->getHtml();
 }