Skip to content

Commit

Permalink
Merge pull request #262 from Nosto/hotfix/article-voucher-order
Browse files Browse the repository at this point in the history
Fix order tagging getting article items that are not products
  • Loading branch information
supercid authored Dec 19, 2023
2 parents f167e87 + 3d69a1e commit 011b083
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Components/Model/Order/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public function loadData(OrderDetail $detail)
->Models()
->getRepository('\Shopware\Models\Article\Detail')
->findOneBy(array('articleId' => $detail->getArticleId()));
if ($articleDetail !== null) {
// Check if the article is a product
if ($articleDetail !== null && $articleDetail->getKind() === 1) {
$this->setProductId($articleDetail->getNumber());
}
} catch (Exception $e) {
Expand Down

0 comments on commit 011b083

Please sign in to comment.