Skip to main content

No options in order status dropdown

More
12 years 11 months ago #128287 by MumsHealth
-- HikaShop version -- : 2.2.2
-- Joomla version -- : 3.x

I've been trying to change the the order statuses of multiple orders using mass action but when I click on the drop down menu for statuses there are none available (see attached).

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #128347 by Xavier
Hi,

Thanks to change the code between:
Code:
$loadedData->massaction_actions['__num__'] = new stdClass(); $loadedData->massaction_actions['__num__']->type = $table->table; $loadedData->massaction_actions['__num__']->name = 'changeStatus'; $loadedData->massaction_actions['__num__']->html = ''; $loadedData->massaction_actions['__num__']->data = array('value' => '', 'notify' => '');
And:
Code:
$loadedData->massaction_actions['__num__'] = new stdClass(); $loadedData->massaction_actions['__num__']->type = $table->table; $loadedData->massaction_actions['__num__']->name = 'addProduct'; $loadedData->massaction_actions['__num__']->html = ''; $loadedData->massaction_actions['__num__']->data = array('value' => '', 'type' => '', 'quantity' => '1');
By:
Code:
foreach($loadedData->massaction_actions as $key => &$value) { if(($value->name != 'changeStatus' || ($table->table != $loadedData->massaction_table && is_int($key)))) continue; $db->setQuery('SELECT `category_name` FROM '.hikashop_table('category').' WHERE `category_type` = '.$db->quote('status').' AND `category_name` != '.$db->quote('order status')); $orderStatuses = $db->loadObjectList(); $output='<div id="'.$table->table.'action'.$key.'changeStatus">'; $output.= JText::_('NEW_ORDER_STATUS').': <select class="chzn-done not-processed" id="action_'.$table->table.'_'.$key.'_changeStatus_value" name="action['.$table->table.']['.$key.'][changeStatus][value]">'; if(is_array($orderStatuses)){ foreach($orderStatuses as $orderStatus){ $orderStatus = $orderStatus->category_name; $selected=''; if($orderStatus==$value->data['value']){ $selected='selected="selected"'; } $output.='<option '.$selected.' value="'.$orderStatus.'">'.JText::_($orderStatus).'</option>'; } } $checked=''; if(isset($value->data['notify']) && $value->data['notify']==1){ $checked='checked="checked"'; } $output.='</select><input type="checkbox" '.$checked.' value="1" id="action_'.$table->table.'_'.$key.'_changeStatus_notify" name="action['.$table->table.']['.$key.'][changeStatus][notify]"/><label for="action_'.$table->table.'_'.$key.'_changeStatus_notify">'.JText::_('SEND_NOTIFICATION_EMAIL').'</label></div>'; $actions_html[$value->name] = $massactionClass->initDefaultDiv($value, $key, $type, $table->table, $loadedData, $output); }
in the file "plugins\system\hikashopmassaction\hikashopmassaction.php"
The following user(s) said Thank You: MumsHealth

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #128432 by MumsHealth
Thank you worked like a charm

Please Log in or Create an account to join the conversation.

Time to create page: 0.209 seconds
Powered by Kunena Forum