$status = $this->getContainer()->get(ModelManager::class)->find(DetailStatus::class, $detail['statusId']); if(!$status){ thrownewNotFoundException(sprintf('DetailStatus by id %s not found', $detail['statusId'])); } $detailModel->setStatus($status); unset($detail['statusId']);
$tax = $this->getContainer()->get(ModelManager::class)->find(Tax::class, $detail['taxId']); if(!$tax){ thrownewNotFoundException(sprintf('Tax by id %s not found', $detail['taxId'])); } $detailModel->setTax($tax); unset($detail['taxId']);
classStructHelper { publicfunctionassignProductData(ListProduct $listProduct, ListProduct $product) { trigger_error(sprintf('%s:%s is deprecated since Shopware 5.6 and will be removed with 5.7. Will be removed without replacement.', __CLASS__, __METHOD__), E_USER_DEPRECATED);
// Need to set the tax data directly for following price calculations which use the tax object of the article
if(isset($data['tax'])){ $article->setTax($data['tax']); }