Bonjour,
Changez le code:
if(isset($action['order']['order_tax_amount']) && !empty($order_taxes)){
if(count($order_taxes) == 1){
$order_tax = reset($order_taxes);
$params->elements[$i]->order_tax_amount = $order_tax->tax_amount;
}else{
unset($params->action['order']['order_tax_amount']);
$j = 0;
foreach($order_taxes as $tax){
$name = 'order_tax_amount'.$j;
$params->elements[$i]->$name = $tax->tax_amount;
$params->action['order']['order_tax_amount'.$j] = 'order_tax_amount'.$j;
$params->lock['order']['order_tax_amount'.$j] = new stdClass();
$params->lock['order']['order_tax_amount'.$j]->column = true;
$params->lock['order']['order_tax_amount'.$j]->square = true;
$params->lock['order']['order_tax_amount'.$j]->ids = 'all';
$j++;
}
}
}
// Manage the order tax namekey
if(isset($action['order']['order_tax_namekey'])){
if(count($order_taxes) == 1){
$order_tax = reset($order_taxes);
$params->elements[$i]->order_tax_namekey = $order_tax->tax_namekey;
}else{
unset($params->action['order']['order_tax_namekey']);
$j = 0;
foreach($order_taxes as $element){
$name = 'order_tax_namekey'.$j;
$params->elements[$i]->$name = $element->tax_namekey;
$params->action['order']['order_tax_namekey'.$j] = 'order_tax_namekey'.$j;
$params->lock['order']['order_tax_namekey'.$j] = new stdClass();
$params->lock['order']['order_tax_namekey'.$j]->column = true;
$params->lock['order']['order_tax_namekey'.$j]->square = true;
$params->lock['order']['order_tax_namekey'.$j]->ids = 'all';
$j++;
}
}
}
en:
if(isset($action['order']['order_tax_amount']) && !empty($order_taxes)){
$j = 0;
$params->elements[$i]->order_tax_amount = 0;
foreach($order_taxes as $tax){
$name = 'order_tax_amount_'.str_replace(array(' ', '(', ')', '%'), '', $tax->tax_namekey);
$params->elements[$i]->$name = $tax->tax_amount;
$params->elements[$i]->order_tax_amount += $tax->tax_amount;
$params->action['order'][$name] = $name;
$params->lock['order'][$name] = new stdClass();
$params->lock['order'][$name]->column = true;
$params->lock['order'][$name]->square = true;
$params->lock['order'][$name]->ids = 'all';
$j++;
}
}
// Manage the order tax namekey
if(isset($action['order']['order_tax_namekey'])){
if(count($order_taxes) == 1){
$order_tax = reset($order_taxes);
$params->elements[$i]->order_tax_namekey = $order_tax->tax_namekey;
}else{
$j = 0;
$params->elements[$i]->order_tax_namekey = '';
foreach($order_taxes as $element){
$name = 'order_tax_namekey'.$j;
$params->elements[$i]->$name = $element->tax_namekey;
$params->elements[$i]->order_tax_namekey.= $element->tax_namekey. ' ';
$params->action['order']['order_tax_namekey'.$j] = 'order_tax_namekey'.$j;
$params->lock['order']['order_tax_namekey'.$j] = new stdClass();
$params->lock['order']['order_tax_namekey'.$j]->column = true;
$params->lock['order']['order_tax_namekey'.$j]->square = true;
$params->lock['order']['order_tax_namekey'.$j]->ids = 'all';
$j++;
}
trim($params->elements[$i]->order_tax_namekey);
}
}
dans le fichier administrator/components/com_hikashop/classes/massaction.php et cela devrait fonctionner.