No options in order status dropdown

  • Posts: 68
  • Thank you received: 8
  • Hikashop Business
11 years 1 month ago #128287

-- 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).

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
11 years 1 month ago #128347

Hi,

Thanks to change the code between:

			$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:
			$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:
			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.

  • Posts: 68
  • Thank you received: 8
  • Hikashop Business
11 years 1 month ago #128432

Thank you worked like a charm

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

Time to create page: 0.068 seconds
Powered by Kunena Forum