Skip to content

Commit 4774f3e

Browse files
authored
MDEE-450: Variant wrongly marked as deleted (#269)
* MDEE-450: Variant wrongly marked as deleted
1 parent c456458 commit 4774f3e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ProductVariantDataExporter/Model/Query/MarkRemovedEntitiesQuery.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,14 @@ public function getQuery(array $ids, FeedIndexMetadata $metadata): Select
7070
\sprintf('f.product_id = removed_product.%s', $fieldName),
7171
['is_deleted' => new \Zend_Db_Expr('1')]
7272
)
73+
->joinLeft(
74+
['parent' => $catalogProductTable],
75+
'f.parent_id = parent.entity_id',
76+
[]
77+
)
7378
->joinLeft(
7479
['link' => $this->resourceConnection->getTableName('catalog_product_super_link')],
75-
'link.product_id = f.product_id AND link.parent_id = f.parent_id',
80+
\sprintf('link.product_id = f.product_id AND link.parent_id = parent.%s', $productEntityJoinField),
7681
[]
7782
)
7883
->joinLeft(

0 commit comments

Comments
 (0)