value)) { $currency = VirtueMartModelVendor::getVendorCurrency($vendor_id); $this->value = $currency->virtuemart_currency_id; } // why not logged vendor? shared is missing $db = vFactory::getDbo(); $query = 'SELECT `virtuemart_currency_id` AS value, `currency_name` AS text FROM `#__virtuemart_currencies` WHERE `virtuemart_vendor_id` = "1" AND `published` = "1" ORDER BY `currency_name` ASC '; // default value should be vendor currency $db->setQuery($query); $values = $db->loadObjectList(); foreach ($values as $v) { $options[] = vHtml::_('select.option', $v->value, $v->text); } // Merge any additional options in the XML definition. $options = array_merge(parent::getOptions(), $options); return $options; } } //could be written abstract with eval if(JVM_VERSION>0){ $o = vRequest::getCmd('option',false); if($o=='com_modules' or $o=='com_plugins') { jimport( 'joomla.form.formfield' ); class JFormFieldVmCurrencies extends vFormFieldVmCurrencies { public function __construct ($form = null) { parent::__construct( $form ); vBasicModel::addIncludePath( VMPATH_ADMIN.DS.'vmf'.DS.'html', 'html' ); vFactory::$_lang = vFactory::getLanguage(); } } } }