function fetchElement($name, $value, &$node, $control_name) { $mainframe = JFactory::getApplication(); Tienda::load('TiendaSelect', 'library.select'); $id = JRequest::getInt('cid'); if ($id) { $K2Item = JTable::getInstance('K2Item', 'Table'); $K2Item->load($id); $params = new K2Parameter($K2Item->plugins, JPATH_PLUGINS . '/k2/tienda.xml', 'tienda'); $id = $params->get('productID'); $db = JFactory::getDBO(); $query = "SELECT manufacturer_id FROM #__tienda_products WHERE product_id=" . (int) $id; $db->setQuery($query); $manufacturer = $db->loadResult(); } return TiendaSelect::manufacturer(@$manufacturer, 'plugins[tiendaproductManufacturer]', '', 'pluginstiendaproductManufacturer', false, true); }
<?php defined('_JEXEC') or die('Restricted access'); $form = @$this->form; $row = @$this->row; $helper_product = new TiendaHelperProduct(); ?> <table class="table table-striped table-bordered" style="width: 100%;"> <tr> <td class="dsc-key"><?php echo JText::_('COM_TIENDA_MANUFACTURER'); ?> :</td> <td class="dsc-value"><?php echo TiendaSelect::manufacturer(@$row->manufacturer_id, 'manufacturer_id', '', 'manufacturer_id', false, true); ?> </td> </tr> <?php if (empty($row->product_id)) { // doing a new product, so display a notice ?> <tr> <td class="dsc-key"><?php echo JText::_('COM_TIENDA_PRODUCT_ATTRIBUTES'); ?> :</td> <td class="dsc-value"> <div class="note well"> <?php
<div class="note"> <?php echo JText::_('COM_TIENDA_ENTER_PRODUCT_NAME'); ?> : <input type="text" name="filter_product_name" id="filter_product_name" value="<?php echo @$state->filter_product_name; ?> " style="width: 250px;" /> <br /><br /> <?php echo JText::_('COM_TIENDA_MANUFACTURER'); ?> : <?php echo TiendaSelect::manufacturer(@$state->filter_manufacturer_id, 'filter_manufacturer_id', array('class' => 'inputbox', 'size' => '1'), null, true); ?> <br/><br/> <?php echo JText::_('COM_TIENDA_SELECT_DATE_RANGE'); ?> : <?php $attribs = array('class' => 'inputbox', 'size' => '1'); ?> <?php echo TiendaSelect::reportrange(@$state->filter_range ? $state->filter_range : 'custom', 'filter_range', $attribs, 'range', true); ?> <span class="label"><?php