Esempio n. 1
0
 public function getInput()
 {
     require_once JPATH_ADMINISTRATOR . '/components/com_k2store/models/lengths.php';
     $model = new K2StoreModelLengths();
     $lengths = $model->getLengths();
     //generate country filter list
     $length_options = array();
     foreach ($lengths as $row) {
         $length_options[] = JHTML::_('select.option', $row->length_class_id, $row->length_title);
     }
     return JHTML::_('select.genericlist', $length_options, $this->name, 'onchange=', 'value', 'text', $this->value);
 }
Esempio n. 2
0
 protected function getLengthClass($product_id)
 {
     $product = $this->getData($product_id);
     require_once JPATH_ADMINISTRATOR . '/components/com_k2store/models/lengths.php';
     $model = new K2StoreModelLengths();
     $lengths = $model->getLengths();
     //generate country filter list
     $length_options = array();
     $length_options[] = JHTML::_('select.option', 0, JText::_('K2STORE_METRICS_SELECT_LENGTH_CLASS'));
     foreach ($lengths as $row) {
         $length_options[] = JHTML::_('select.option', $row->length_class_id, $row->length_title);
     }
     return JHTML::_('select.genericlist', $length_options, 'plugins[k2storeitem_metrics][item_length_class_id]', 'onchange=', 'value', 'text', $product->item_length_class_id);
 }