Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Commit

Permalink
Update DataProviderHelper.php
Browse files Browse the repository at this point in the history
Fixes #265
  • Loading branch information
ah-net authored Aug 30, 2022
1 parent 3003121 commit 1a4e99d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Model/Autocomplete/DataProviderHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,12 @@ public function getProductItems(AutocompleteProductResponseInterface $response)
$result = [];
foreach ($response->getProductData() as $item) {
$product = $productCollection->getItemById($item['id']);
$product->setData('tweakwise_price', $item['tweakwise_price']);

if (!$product) {
continue;
}

$product->setData('tweakwise_price', $item['tweakwise_price']);

$result[] = $this->productItemFactory->create(['product' => $product]);
}
Expand Down

0 comments on commit 1a4e99d

Please sign in to comment.