Hello,
I get it ! This case was totally new for us !
Thanks for provide your website that allow us to get a bug, and add a fix !
In order to correct it, follow these steps :
- Get your file field.php, here in ...\administrator\components\com_hikashop\classes
find this arround line 440 :
case 'item':
$order_id = (int)@$data->order_id;
if($order_id > 0){
$orderClass = hikashop_get('class.order');
$order = $orderClass->get($order_id);
$user_id = (int)@$order->order_user_id;
} else {
$user_id = 0;
}
break;
And this
$id = 'product_id'; just before
break; to get this :
case 'item':
$order_id = (int)@$data->order_id;
if($order_id > 0){
$orderClass = hikashop_get('class.order');
$order = $orderClass->get($order_id);
$user_id = (int)@$order->order_user_id;
} else {
$user_id = 0;
}
$id = 'product_id';
break;
And in
...\administrator\components\com_hikashop\views\order\tmpl, get
invoice.php and find this around line
200 :
if(!empty($itemFields)) {
foreach($itemFields as $field){
$namekey = $field->field_namekey;
if(empty($product->$namekey) && !strlen($product->$namekey)){
continue;
}
And replace
if(empty($product->$namekey) && !strlen($product->$namekey)){
by this
if(empty($product->$namekey) && (!isset($product->$namekey) || !strlen($product->$namekey))){
to get this :
if(!empty($itemFields)) {
foreach($itemFields as $field){
$namekey = $field->field_namekey;
if(empty($product->$namekey) && (!isset($product->$namekey) || !strlen($product->$namekey))){
continue;
}
That must solve your issue, but I awaiting news from you.
Note : that this fix is now added to our Version from now.
Regards