Skip to content

Commit 8d9dde0

Browse files
committed
Show the desired part, when searching for the pollin part number
1 parent b2d4333 commit 8d9dde0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Services/InfoProviderSystem/Providers/PollinProvider.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ public function searchByKeyword(string $keyword): array
7474
]);
7575

7676
$content = $response->getContent();
77+
78+
//If the response has us redirected to the product page, then just return the single item
79+
if ($response->getInfo('redirect_count') > 0) {
80+
return [$this->parseProductPage($content)];
81+
}
82+
7783
$dom = new Crawler($content);
7884

7985
$results = [];

0 commit comments

Comments
 (0)