return $mainData;
} /**
* Replaces the variant's translations with the product's.
*
* @param int $articleId
* @param array $variants
*/
protected function overrideVariantTranslations($articleId,
$variants) { $coreTranslations =
$this->
getTranslationComponent()->
readBatch(null, 'article',
$articleId);
foreach ($variants as $variant) { $this->
getTranslationComponent()->
delete(null, 'variant',
$variant->
getId());
foreach ($coreTranslations as &
$coreTranslation) { unset($coreTranslation['objectdata'
]['metaTitle'
]);
unset($coreTranslation['objectdata'
]['name'
]);
unset($coreTranslation['objectdata'
]['description'
]);
unset($coreTranslation['objectdata'
]['descriptionLong'
]);
unset($coreTranslation['objectdata'
]['keywords'
]);
$coreTranslation['objectkey'
] =
$variant->
getId();