Hi,
So the idea is to override the view "ordermarket | export_show" in order to add new fields.
These fields will be read by the custom plugin to override the SQL query made for the export.
Because you do not have empty value in your custom field, you will have to put the dropdown manually
$values = array(
JHTML::_('select.option', '', JText::_('NO_FILTER')),
JHTML::_('select.option', 'Bérlet', 'Bérlet'),
JHTML::_('select.option', '...', '...'),
JHTML::_('select.option', '...', '...')
);
echo JHTML::_('select.genericlist', $values, 'filter_koltseg_jelleg', '', 'value', 'text', '');
And do a " JRequest::getValue('filter_koltseg_jelleg', '') " in the custom plugin to read the value and add the filter in the export SQL query.
To do so, you have to edit the file "component/com_hikamarket/ordermarket/view.html.php" and put this code for the export
$select = '';
$from = '';
JPluginHelper::importPlugin('hikashop');
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('onBeforeOrderExportQuery', array(&$select, &$from, &$filters, &$order, &$searchMap, &$orderingAccept) );
$this->processFilters($filters, $order, $searchMap, $orderingAccept);
//
// Data / Database
//
$query = 'FROM '.hikamarket::table($cfg['table']).' AS hkorder '.
'LEFT JOIN '.hikamarket::table('shop.user').' AS hkuser ON hkorder.order_user_id = hkuser.user_id '.
'LEFT JOIN '.hikamarket::table('joomla.users').' AS juser ON hkuser.user_cms_id = juser.id '.
$from.' '.$filters.' '.$order;
if(!empty($select) && substr($select, 0, 1) != ',')
$select = ','.$select;
$db->setQuery('SELECT hkorder.*, hkuser.*, juser.name, juser.username '.$select.$query);
I didn't finished all my tests for the moment but this code should work and provide all required features.
Regards,