Hello,
Okay.
So the best would be to follow what HikaShop has also modified in his order notification email.
You can replace the in HikaMarket order notification preload:
$fields = $fieldsClass->getFields('frontcomp',$data,'order','');
foreach($fields as $fieldName => $oneExtraField) {
if(isset($data->$fieldName) && !isset($data->order->$fieldName))
$data->order->$fieldName = $data->$fieldName;
if(empty($data->order->$fieldName))
continue;
echo $sep . $fieldsClass->trans($oneExtraField->field_realname).' : '.$fieldsClass->show($oneExtraField, $data->order->$fieldName,'user_email');
$sep = '<br />';
}
By
$fields = $fieldsClass->getFields('display:mail_status_notif=1',$data,'order','');
foreach($fields as $fieldName => $oneExtraField) {
if(isset($data->$fieldName) && !isset($data->cart->$fieldName))
$data->cart->$fieldName = $data->$fieldName;
if(empty($data->cart->$fieldName))
continue;
echo $sep . $fieldsClass->trans($oneExtraField->field_realname).' : '.$fieldsClass->show($oneExtraField, $data->cart->$fieldName,'user_email');
$sep = '<br />';
}
Thanks to these modifications, the email will use the same filters for the custom fields and will use the data from "data->cart" instead of "data->order".
Because "data->order" is based on what is available during the trigger, the custom fields might not be all loaded ; and the modification in HikaShop (via le mass-action system) have reduced the data in the triggers (to reduce the loading and optimize the content).
Regards,