if ($variant instanceof ProductVariant
) { $mainVariant =
$variant->
getArticle()->
getMainDetail();
$data['ean'
] =
$variant->
getEan();
if (!\
is_string($data['ean'
]) &&
$mainVariant instanceof ProductVariant
) { $data['ean'
] =
$mainVariant->
getEan();
} $unit =
$variant->
getUnit();
if (!
$unit instanceof Unit &&
$mainVariant instanceof ProductVariant
) { $unit =
$mainVariant->
getUnit();
} $data['unit'
] =
$unit instanceof Unit ?
$unit->
getName() : null;
$data['packunit'
] =
$variant->
getPackUnit();
if (!\
is_string($data['packunit'
]) &&
$mainVariant instanceof ProductVariant
) { $data['packunit'
] =
$mainVariant->
getPackUnit();
} $languageData =
Shopware()->
Db()->
fetchRow( 'SELECT s_core_shops.default, s_order.language AS languageId
FROM s_core_shops
INNER JOIN s_order ON s_order.language = s_core_shops.id
WHERE s_order.id = :orderId
LIMIT 1',
[