Skip to content

Commit bac3b98

Browse files
Assign Parent's short description to child in case of empty (#487)
* Assign Parent's short description to child in case of empty * Used variable removed * New lines removed * Prev change reverted
1 parent 315838a commit bac3b98

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/code/Meta/Catalog/Model/ProductRepository.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ public function loadParentProductData(Product $childProduct, Product $product):
9797
if (!$childProduct->getDescription()) {
9898
$childProduct->setDescription($product->getDescription());
9999
}
100+
if (!$childProduct->getShortDescription()) {
101+
$childProduct->setShortDescription($product->getShortDescription());
102+
}
100103
if (!$childProduct->getWeight()) {
101104
$childProduct->setWeight($product->getWeight());
102105
}
@@ -128,7 +131,7 @@ public function getCollection(array $productIds, $storeId)
128131
->addStoreFilter($storeId)
129132
->setStoreId($storeId)
130133
->getSelect();
131-
134+
132135
return $collection->getItems();
133136
}
134137

@@ -177,7 +180,7 @@ public function getParentProductLink(array $productIds)
177180
'p.entity_id'
178181
)
179182
->where('product_id IN (?)', $productIds);
180-
183+
181184
return $connection->fetchPairs($select);
182185
}
183186
}

0 commit comments

Comments
 (0)