Пример #1
0
    ?>
						</td>
					</tr>
					<tr>
						<td><?php 
    echo vmText::_('COM_VIRTUEMART_ORDER_PRINT_SHIPMENT_LBL');
    ?>
</td>
						<td>
							<input type="hidden" size="10" name="virtuemart_shipmentmethod_id" value="<?php 
    echo $this->orderbt->virtuemart_shipmentmethod_id;
    ?>
"/>
							<!--
							<?php 
    echo VmHTML::select("virtuemart_shipmentmethod_id", $shipments, $this->orderbt->virtuemart_shipmentmethod_id, '', "virtuemart_shipmentmethod_id", "shipment_name");
    ?>
							<span id="delete_old_shipment" style="display: none;"><br />
								<input id="delete_old_shipment" type="checkbox" name="delete_old_shipment" value="1" /> <label class='' for=""><?php 
    echo vmText::_('COM_VIRTUEMART_ORDER_EDIT_CALCULATE');
    ?>
</label>
							</span>
							-->
							<?php 
    foreach ($shipments as $shipment) {
        if ($shipment->virtuemart_shipmentmethod_id == $this->orderbt->virtuemart_shipmentmethod_id) {
            echo $shipment->shipment_name;
        }
    }
    ?>
    /**
     * Display for the cart
     *
     * @author Patrick Kohl
     * @param obj $product product object
     * @return html code
     */
    public function getProductCustomsFieldCart($product)
    {
        // group by virtuemart_custom_id
        $query = 'SELECT C.`virtuemart_custom_id`, `custom_title`, `show_title`, C.`custom_value`,`custom_field_desc` ,`custom_tip`,`field_type`,field.`virtuemart_customfield_id`,`is_hidden`
				FROM `#__virtuemart_customs` AS C
				LEFT JOIN `#__virtuemart_product_customfields` AS field ON C.`virtuemart_custom_id` = field.`virtuemart_custom_id`
				Where `virtuemart_product_id` =' . (int) $product->virtuemart_product_id . ' and `field_type` != "G" and `field_type` != "R" and `field_type` != "Z"';
        $query .= ' and is_cart_attribute = 1 group by virtuemart_custom_id ORDER BY field.`ordering`';
        $this->_db->setQuery($query);
        $groups = $this->_db->loadObjectList();
        $err = $this->_db->getErrorMsg();
        if (!empty($err)) {
            vmWarn('getProductCustomsFieldCart ' . $err);
        } else {
            if (empty($groups)) {
                return array();
            }
        }
        JLoader::register('VmHTML', JPATH_VM_ADMINISTRATOR . 'helpers/html.php');
        $row = 0;
        JLoader::register('CurrencyDisplay', JPATH_VM_ADMINISTRATOR . '/helpers/currencydisplay.php');
        $currency = CurrencyDisplay::getInstance();
        JLoader::register('calculationHelper', JPATH_VM_ADMINISTRATOR . '/helpers/calculationh.php');
        $calculator = calculationHelper::getInstance();
        $calculator->_product = $product;
        $calculator->_cats = $product->categories;
        $calculator->product_tax_id = isset($product->product_tax_id) ? $product->product_tax_id : 0;
        $calculator->product_discount_id = isset($product->product_discount_id) ? $product->product_discount_id : 0;
        $calculator->productCurrency = isset($product->product_currency) ? $product->product_currency : $calculator->productCurrency;
        JLoader::register('vmCustomPlugin', JPATH_VM_PLUGINS . '/vmcustomplugin.php');
        //$free = JText::_ ('COM_VIRTUEMART_CART_PRICE_FREE');
        // render select list
        foreach ($groups as $group) {
            //				$query='SELECT  field.`virtuemart_customfield_id` as value ,concat(field.`custom_value`," :bu ", field.`custom_price`) AS text
            $query = 'SELECT field.`virtuemart_product_id`, `custom_params`,`custom_element`, field.`virtuemart_custom_id`,
							field.`virtuemart_customfield_id`,field.`custom_value`, field.`custom_price`, field.`custom_param`
					FROM `#__virtuemart_customs` AS C
					LEFT JOIN `#__virtuemart_product_customfields` AS field ON C.`virtuemart_custom_id` = field.`virtuemart_custom_id`
					Where `virtuemart_product_id` =' . (int) $product->virtuemart_product_id;
            $query .= ' and is_cart_attribute = 1 and C.`virtuemart_custom_id`=' . (int) $group->virtuemart_custom_id;
            // We want the field to be ordered as the user defined
            $query .= ' ORDER BY field.`ordering`';
            $this->_db->setQuery($query);
            $options = $this->_db->loadObjectList();
            //vmdebug('getProductCustomsFieldCart options',$options);
            $group->options = array();
            foreach ($options as $option) {
                $group->options[$option->virtuemart_customfield_id] = $option;
            }
            if ($group->field_type == 'V') {
                $default = current($group->options);
                foreach ($group->options as $productCustom) {
                    $price = self::_getCustomPrice($productCustom->custom_price, $currency, $calculator);
                    $productCustom->text = $productCustom->custom_value . ' ' . $price;
                }
                $group->display = VmHTML::select('customPrice[' . $row . '][' . $group->virtuemart_custom_id . ']', $group->options, $default->custom_value, '', 'virtuemart_customfield_id', 'text', FALSE, false);
            } else {
                if ($group->field_type == 'G') {
                    $group->display .= '';
                    // no direct display done by plugin;
                } else {
                    if ($group->field_type == 'E') {
                        $group->display = '';
                        JLoader::register('vmCustomPlugin', JPATH_VM_PLUGINS . '/vmcustomplugin.php');
                        foreach ($group->options as $k => $productCustom) {
                            $price = self::_getCustomPrice($productCustom->custom_price, $currency, $calculator);
                            $productCustom->text = $productCustom->custom_value . ' ' . $price;
                            $productCustom->virtuemart_customfield_id = $k;
                            //legacy, it will be removed 2.2
                            $productCustom->value = $productCustom->virtuemart_customfield_id;
                            JPluginHelper::importPlugin('vmcustom');
                            $dispatcher = JDispatcher::getInstance();
                            $fieldsToShow = $dispatcher->trigger('plgVmOnDisplayProductVariantFE', array($productCustom, &$row, &$group));
                            //	$group->display .= '<input type="hidden" value="' . $k . '" name="customPrice[' . $row . '][' . $group->virtuemart_custom_id . ']" /> ';
                            $group->display .= '<input type="hidden" value="' . $productCustom->virtuemart_customfield_id . '" name="customPrice[' . $row . '][' . $productCustom->virtuemart_custom_id . ']" /> ';
                            if (!empty($currency->_priceConfig['variantModification'][0]) and $price !== '') {
                                $group->display .= '<div class="price-plugin">' . JText::_('COM_VIRTUEMART_CART_PRICE') . '<span class="price-plugin">' . $price . '</span></div>';
                            }
                            $row++;
                        }
                        $row--;
                    } else {
                        if ($group->field_type == 'U') {
                            foreach ($group->options as $productCustom) {
                                $price = self::_getCustomPrice($productCustom->custom_price, $currency, $calculator);
                                $productCustom->text = $productCustom->custom_value . ' ' . $price;
                                $group->display .= '<input type="text" value="' . JText::_($productCustom->custom_value) . '" name="customPrice[' . $row . '][' . $group->virtuemart_custom_id . '][' . $productCustom->value . ']" /> ';
                                if (!empty($currency->_priceConfig['variantModification'][0]) and $price !== '') {
                                    $group->display .= '<div class="price-plugin">' . JText::_('COM_VIRTUEMART_CART_PRICE') . '<span class="price-plugin">' . $price . '</span></div>';
                                }
                            }
                        } else {
                            if ($group->field_type == 'A') {
                                $group->display = '';
                                foreach ($group->options as $productCustom) {
                                    /*	if ((float)$productCustom->custom_price) {
                                    				$price = $currency->priceDisplay ($calculator->calculateCustomPriceWithTax ($productCustom->custom_price));
                                    			}
                                    			else {
                                    				$price = ($productCustom->custom_price === '') ? '' : $free;
                                    			}*/
                                    $productCustom->field_type = $group->field_type;
                                    $productCustom->is_cart = 1;
                                    $group->display .= $this->displayProductCustomfieldFE($product, $productCustom, $row);
                                    $checked = '';
                                }
                            } else {
                                $group->display = '';
                                $checked = 'checked="checked"';
                                foreach ($group->options as $productCustom) {
                                    //vmdebug('getProductCustomsFieldCart',$productCustom);
                                    $price = self::_getCustomPrice($productCustom->custom_price, $currency, $calculator);
                                    $productCustom->field_type = $group->field_type;
                                    $productCustom->is_cart = 1;
                                    //	$group->display .= '<input id="' . $productCustom->virtuemart_custom_id . '" ' . $checked . ' type="radio" value="' .
                                    //		$productCustom->virtuemart_custom_id . '" name="customPrice[' . $row . '][' . $productCustom->virtuemart_customfield_id . ']" /><label
                                    //		for="' . $productCustom->virtuemart_custom_id . '">' . $this->displayProductCustomfieldFE ($productCustom, $row) . ' ' . $price . '</label>';
                                    //MarkerVarMods
                                    $group->display .= '<input id="' . $productCustom->virtuemart_custom_id . $row . '" ' . $checked . ' type="radio" value="' . $productCustom->virtuemart_customfield_id . '" name="customPrice[' . $row . '][' . $productCustom->virtuemart_custom_id . ']" /><label
										for="' . $productCustom->virtuemart_custom_id . '" class="other-customfield">' . $this->displayProductCustomfieldFE($product, $productCustom, $row) . ' ' . $price . '</label>';
                                    $checked = '';
                                }
                            }
                        }
                    }
                }
            }
            $row++;
        }
        return $groups;
    }
Пример #3
0
                         <?php 
     echo $row->country_name;
     ?>
                     </td>
                     <?php 
 } else {
     ?>
                     <td align="left">
                         <?php 
     if ($show_edit) {
         ?>
                             <?php 
         echo VmHTML::show_image(JUri::root() . '/' . $row->country_flag, 'class="required"', 20, 20);
         ?>
                             <?php 
         echo VmHTML::select('tsmart_country_id', $this->list_country, $row->tsmart_country_id, '', 'tsmart_country_id', 'country_name');
         ?>
                         <?php 
     } else {
         ?>
                             <?php 
         echo VmHTML::show_image(JUri::root() . '/' . $row->country_flag, 'class="required"', 20, 20);
         ?>
                             <?php 
         echo $row->country_name;
         ?>
                         <?php 
     }
     ?>
                     </td>
                     <td align="left">
Пример #4
0
 function renderInstalledCustomPlugins($selected)
 {
     $db = JFactory::getDBO();
     $table = '#__extensions';
     $enable = 'enabled';
     $ext_id = 'extension_id';
     //$q = 'SELECT * FROM `'.$table.'` WHERE `folder` = "vmcustom" AND `'.$enable.'`="1" ';
     $q = 'SELECT * FROM `' . $table . '` WHERE `folder` = "vmcustom" ';
     $db->setQuery($q);
     $results = $db->loadAssocList($ext_id);
     if (!class_exists('vmPlugin')) {
         require VMPATH_ADMIN . DS . 'plugins' . DS . 'vmplugin.php';
     }
     foreach ($results as $result) {
         //$filename = 'plg_' .strtolower ( $result['name']).'.sys';
         //$lang->load($filename, JPATH_ADMINISTRATOR);
         $filename = 'plg_' . strtolower($result['name']) . '.sys';
         vmPlugin::loadJLang($filename, 'vmcustom', $result['name']);
     }
     return VmHTML::select('custom_jplugin_id', $results, $selected, "", $ext_id, 'name');
     //return JHtml::_('select.genericlist', $result, 'custom_jplugin_id', null, $ext_id, 'name', $selected);
 }
Пример #5
0
    public function renderOrderstatesList()
    {
        $orderstates = JRequest::getWord('order_status_code', '');
        $query = 'SELECT `order_status_code` as value, `order_status_name` as text
			FROM `#__virtuemart_orderstates`
			WHERE published=1 ';
        $db = JFactory::getDBO();
        $db->setQuery($query);
        $list = $db->loadObjectList();
        return VmHTML::select('order_status_code', $list, $orderstates, 'class="inputbox" onchange="this.form.submit();"');
    }
    public function renderOrderstatesList()
    {
        $orderstates = JRequest::getVar('order_status_code', 'C');
        //print_r($orderstates);
        $query = 'SELECT `order_status_code` as value, `order_status_name` as text
			FROM `#__virtuemart_orderstates`
			WHERE published=1 ';
        $this->_db->setQuery($query);
        $list = $this->_db->loadObjectList();
        foreach ($list as $state) {
            $state->text = ShopFunctions::altText($state->text, 'COM_VIRTUEMART_ORDER_STATUS');
        }
        //$html = VmHTML::select ('order_status_code[]', $list, $orderstates, 'size="7" class="inputbox" onchange="this.form.submit();" multiple="multiple"');
        $html = VmHTML::select('order_status_code[]', $list, $orderstates, 'size="7" class="input-xlarge"  multiple="multiple"');
        return $html;
    }
Пример #7
0
    public function renderOrderstatesList()
    {
        $orderstates = JRequest::getVar('order_status_code', '');
        //print_r($orderstates);
        $query = 'SELECT `order_status_code` as value, `order_status_name` as text
			FROM `#__virtuemart_orderstates`
			WHERE published=1 ';
        $this->_db->setQuery($query);
        $list = $this->_db->loadObjectList();
        return VmHTML::select('order_status_code[]', $list, $orderstates, 'class="inputbox" onchange="this.form.submit();" multiple="multiple"');
    }
Пример #8
0
 function renderInstalledCustomPlugins($selected)
 {
     $db = JFactory::getDBO();
     if (JVM_VERSION === 1) {
         $table = '#__plugins';
         $enable = 'published';
         $ext_id = 'id';
     } else {
         $table = '#__extensions';
         $enable = 'enabled';
         $ext_id = 'extension_id';
     }
     $q = 'SELECT * FROM `' . $table . '` WHERE `folder` = "vmcustom" AND `' . $enable . '`="1" ';
     $db->setQuery($q);
     $results = $db->loadAssocList($ext_id);
     $lang = JFactory::getLanguage();
     foreach ($results as &$result) {
         $filename = 'plg_' . strtolower($result['name']) . '.sys';
         $lang->load($filename, JPATH_ADMINISTRATOR);
         //print_r($lang);
     }
     return VmHTML::select('custom_jplugin_id', $results, $selected, "", $ext_id, 'name');
     //return JHtml::_('select.genericlist', $result, 'custom_jplugin_id', null, $ext_id, 'name', $selected);
 }
Пример #9
0
</h4>
                            <input type="hidden" name="tsmart_service_class_id" value="<?php 
    echo $service_class->tsmart_service_class_id;
    ?>
"/>
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span6">
                            <?php 
    $list_hotel = $service_class->list_hotel;
    for ($i = 0; $i < 2; $i++) {
        $hotel_service_class = $list_hotel[$i];
        ?>
                            <?php 
        echo VmHTML::select('list_hotel_service_class[' . $service_class->tsmart_service_class_id . '][' . ($hotel_service_class->id ? "id:{$hotel_service_class->id}" : '') . ']', $this->list_hotel, $hotel_service_class->tsmart_hotel_id, '', 'tsmart_hotel_id', 'hotel_name');
        ?>
                                <br/>
                            <?php 
    }
    ?>
                        </div>
                        <div class="span6">

                        </div>
                    </div>
                <?php 
}
?>
            </div>
        </div>
Пример #10
0
    /**
     * Display for the cart
     *
     * @author Patrick Kohl
     * @param obj $product product object
     * @return html code
     */
    public function getProductCustomsFieldCart($product)
    {
        // group by virtuemart_custom_id
        $query = 'SELECT C.`virtuemart_custom_id`, `custom_title`, C.`custom_value`,`custom_field_desc` ,`custom_tip`,`field_type`,field.`virtuemart_customfield_id`,`is_hidden`
				FROM `#__virtuemart_customs` AS C
				LEFT JOIN `#__virtuemart_product_customfields` AS field ON C.`virtuemart_custom_id` = field.`virtuemart_custom_id`
				Where `virtuemart_product_id` =' . (int) $product->virtuemart_product_id . ' and `field_type` != "G" and `field_type` != "R" and `field_type` != "Z"';
        $query .= ' and is_cart_attribute = 1 group by virtuemart_custom_id';
        $this->_db->setQuery($query);
        $groups = $this->_db->loadObjectList();
        if (!class_exists('VmHTML')) {
            require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
        }
        $row = 0;
        if (!class_exists('CurrencyDisplay')) {
            require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'currencydisplay.php';
        }
        $currency = CurrencyDisplay::getInstance();
        if (!class_exists('calculationHelper')) {
            require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'calculationh.php';
        }
        $calculator = calculationHelper::getInstance();
        if (!class_exists('vmCustomPlugin')) {
            require JPATH_VM_PLUGINS . DS . 'vmcustomplugin.php';
        }
        $free = JText::_('COM_VIRTUEMART_CART_PRICE_FREE');
        // render select list
        foreach ($groups as $group) {
            //				$query='SELECT  field.`virtuemart_customfield_id` as value ,concat(field.`custom_value`," :bu ", field.`custom_price`) AS text
            $query = 'SELECT field.`virtuemart_product_id`, `custom_params`,`custom_element`, field.`virtuemart_custom_id`, field.`virtuemart_customfield_id` as value ,field.`custom_value`, field.`custom_price`, field.`custom_param`
					FROM `#__virtuemart_customs` AS C
					LEFT JOIN `#__virtuemart_product_customfields` AS field ON C.`virtuemart_custom_id` = field.`virtuemart_custom_id`
					Where `virtuemart_product_id` =' . (int) $product->virtuemart_product_id;
            $query .= ' and is_cart_attribute = 1 and C.`virtuemart_custom_id`=' . (int) $group->virtuemart_custom_id;
            // We want the field to be ordered as the user defined
            $query .= ' ORDER BY field.`ordering`';
            $this->_db->setQuery($query);
            $options = $this->_db->loadObjectList();
            //vmdebug('getProductCustomsFieldCart options',$options);
            $group->options = array();
            foreach ($options as $option) {
                $group->options[$option->value] = $option;
            }
            if ($group->field_type == 'V') {
                $default = current($group->options);
                foreach ($group->options as $productCustom) {
                    if ((double) $productCustom->custom_price) {
                        $price = strip_tags($currency->priceDisplay($calculator->calculateCustomPriceWithTax($productCustom->custom_price)));
                    } else {
                        $price = $productCustom->custom_price === '' ? '' : $free;
                    }
                    $productCustom->text = $productCustom->custom_value . ' ' . $price;
                }
                $group->display = VmHTML::select('customPrice[' . $row . '][' . $group->virtuemart_customfield_id . ']', $group->options, $default->custom_value, '', 'value', 'text', false);
            } else {
                if ($group->field_type == 'G') {
                    $group->display .= '';
                    // no direct display done by plugin;
                } else {
                    if ($group->field_type == 'E') {
                        $group->display = '';
                        foreach ($group->options as $k => $productCustom) {
                            if ((double) $productCustom->custom_price) {
                                $price = $currency->priceDisplay($calculator->calculateCustomPriceWithTax($productCustom->custom_price));
                            } else {
                                $price = $productCustom->custom_price === '' ? '' : $free;
                            }
                            $productCustom->text = $productCustom->custom_value . ' ' . $price;
                            $productCustom->virtuemart_customfield_id = $k;
                            if (!class_exists('vmCustomPlugin')) {
                                require JPATH_VM_PLUGINS . DS . 'vmcustomplugin.php';
                            }
                            JPluginHelper::importPlugin('vmcustom');
                            $dispatcher = JDispatcher::getInstance();
                            $fieldsToShow = $dispatcher->trigger('plgVmOnDisplayProductVariantFE', array($productCustom, &$row, &$group));
                            $group->display .= '<input type="hidden" value="' . $k . '" name="customPrice[' . $row . '][' . $k . ']" /> ';
                            if (!empty($currency->_priceConfig['variantModification'][0]) and $price !== '') {
                                $group->display .= '<div class="price-plugin">' . JText::_('COM_VIRTUEMART_CART_PRICE') . '<span class="price-plugin">' . $price . '</span></div>';
                            }
                            $row++;
                        }
                        $row--;
                    } else {
                        if ($group->field_type == 'U') {
                            foreach ($group->options as $productCustom) {
                                if ((double) $productCustom->custom_price) {
                                    $price = $currency->priceDisplay($calculator->calculateCustomPriceWithTax($productCustom->custom_price));
                                } else {
                                    $price = $productCustom->custom_price === '' ? '' : $free;
                                }
                                $productCustom->text = $productCustom->custom_value . ' ' . $price;
                                $group->display .= '<input type="text" value="' . JText::_($productCustom->custom_value) . '" name="customPrice[' . $row . '][' . $group->virtuemart_customfield_id . '][' . $productCustom->value . ']" /> ';
                                if (!empty($currency->_priceConfig['variantModification'][0]) and $price !== '') {
                                    $group->display .= '<div class="price-plugin">' . JText::_('COM_VIRTUEMART_CART_PRICE') . '<span class="price-plugin">' . $price . '</span></div>';
                                }
                            }
                        } else {
                            if ($group->field_type == 'A') {
                                $group->display = '';
                                foreach ($group->options as $productCustom) {
                                    if ((double) $productCustom->custom_price) {
                                        $price = $currency->priceDisplay($calculator->calculateCustomPriceWithTax($productCustom->custom_price));
                                    } else {
                                        $price = $productCustom->custom_price === '' ? '' : $free;
                                    }
                                    $group->display .= $this->displayType($productCustom->custom_value, $group->field_type, 0, '', $row, 1);
                                    $checked = '';
                                }
                            } else {
                                $group->display = '';
                                $checked = 'checked="checked"';
                                foreach ($group->options as $productCustom) {
                                    if ((double) $productCustom->custom_price) {
                                        $price = $currency->priceDisplay($calculator->calculateCustomPriceWithTax($productCustom->custom_price));
                                    } else {
                                        $price = $productCustom->custom_price === '' ? '' : $free;
                                    }
                                    $group->display .= '<input id="' . $productCustom->value . '" ' . $checked . ' type="radio" value="' . $productCustom->value . '" name="customPrice[' . $row . '][' . $group->virtuemart_customfield_id . ']" /><label for="' . $productCustom->value . '">' . $this->displayType($productCustom->custom_value, $group->field_type, 0, '', $row, 1) . ' ' . $price . '</label>';
                                    $checked = '';
                                }
                            }
                        }
                    }
                }
            }
            $row++;
        }
        return $groups;
    }
Пример #11
0
    });
</script>
<?php 
$js_content = ob_get_clean();
$js_content = TSMUtility::remove_string_javascript($js_content);
$doc->addScriptDeclaration($js_content);
?>
<div class="view-hoteladdon-edit">
    <form action="index.php" method="post" class="form-vertical" name="adminForm" id="adminForm">
        <div class="row-fluid">
            <div class="span4">
                <h3> Service name</h3>
            </div>
            <div class="span8">
                <?php 
echo VmHTML::select('tsmart_hotel_id', $this->list_hotel, $this->item->tsmart_hotel_id, ' ', 'tsmart_hotel_id', 'hotel_name');
?>
                <br/>
                <?php 
echo VmHTML::input('location', $this->hotel->city_area_name, ' placeholder="location" readonly ');
?>



                <h3>Edit term</h3>
                <div class="row-fluid">
                    <div class="span6">
                        <?php 
echo VmHTML::list_radio('hotel_addon_type', $this->list_hotel_addon_type, $this->item->hotel_addon_type);
?>
Пример #12
0
        echo $editlink;
        ?>
"><?php 
        echo TSMUtility::truncate($row->answer);
        ?>
 </a>
                            <?php 
    }
    ?>
                        </td>
                        <td align="left">
                            <?php 
    if ($show_edit) {
        ?>
                                <?php 
        echo VmHTML::select('tsmart_categoryfaq_id', $this->list_categoryfaq, $row->tsmart_categoryfaq_id, '', 'tsmart_categoryfaq_id', 'categoryfaq_name');
        ?>
                            <?php 
    } else {
        ?>
                                <?php 
        echo $row->categoryfaq_name;
        ?>
                            <?php 
    }
    ?>

                        </td>

                        <td align="left">
Пример #13
0
    public function renderShipmentsList()
    {
        $zas_orders_model = VmModel::getModel('zasilkovna_orders');
        $selected_shipment = JRequest::getInt('order_shipment_code', '');
        $query = 'SELECT virtuemart_shipmentmethod_id as value,shipment_name as text
			FROM `#__virtuemart_shipmentmethods_' . VMLANG . '`';
        $db = JFactory::getDBO();
        $db->setQuery($query);
        $list = $db->loadObjectList();
        $db->setQuery($query);
        $objList = $db->loadObjectList();
        $allObj = new stdClass();
        $allObj->value = $zas_orders_model->ALL_ORDERS;
        $allObj->text = "Všechny objednávky";
        $objList[] = $allObj;
        $zasObj = new stdClass();
        $zasObj->value = $zas_orders_model->ZASILKOVNA_ORDERS;
        $zasObj->text = "Všechny objednávky zásilkovny";
        $objList[] = $zasObj;
        return VmHTML::select('order_shipment_code', $objList, $selected_shipment, 'class="inputbox" onchange="this.form.submit();"');
    }
 function renderInstalledCustomPlugins($selected, $resultOnly = null)
 {
     $db = JFactory::getDBO();
     $q = 'SELECT * FROM `#__extensions` WHERE `folder` = "vmcustom" AND `enabled`="1" ';
     $db->setQuery($q);
     $results = $db->loadAssocList('extension_id');
     $this->lang = JFactory::getLanguage();
     foreach ($results as &$result) {
         $filename = 'plg_vmcustom_' . strtolower($result['element']) . '.sys';
         $this->lang->load($filename, JPATH_ADMINISTRATOR);
         //print_r($lang);
     }
     // set all types for "NEW" custom field modal
     if ($resultOnly) {
         return $results;
     }
     return VmHTML::select('custom_jplugin_id', $results, $selected, "", 'extension_id', 'name');
     //return JHtml::_('select.genericlist', $result, 'custom_jplugin_id', null, $ext_id, 'name', $selected);
 }
 function parentsList()
 {
     $vendorId = 1;
     $value = JRequest::getInt('custom_parent_id', 0);
     // get custom parents
     $q = 'SELECT c.`virtuemart_custom_id` as value ,c.`custom_title` as text FROM `#__virtuemart_customs` as c';
     $q .= ' JOIN `#__virtuemart_customs` as cc on c.`virtuemart_custom_id` = cc.`custom_parent_id`';
     $q .= ' WHERE c.`custom_parent_id`=0 group by value';
     //if (isset($this->virtuemart_custom_id)) $q.=' and virtuemart_custom_id !='.$this->virtuemart_custom_id;
     $this->_db->setQuery($q);
     $result = $this->_db->loadObjectList();
     $emptyOption = JHTML::_('select.option', '', '- ' . JText::_('COM_VIRTUEMART_CUSTOM_PARENT') . ' -', 'value', 'text');
     array_unshift($result, $emptyOption);
     return VmHTML::select('custom_parent_id', $result, $value, 'onchange="Joomla.ajaxSearch(this); return false;"', 'value', 'text', false);
 }