Allow to extract prices form an Amazon page

This commit is contained in:
Jan Böhmer 2026-02-01 16:51:26 +01:00
parent b89e878871
commit 73dbe64a83

View file

@ -196,6 +196,16 @@ class GenericWebProvider implements InfoProviderInterface
price: $price,
currency_iso_code: $this->getMetaContent($dom, 'product:price:currency'),
);
} else {
//Amazon fallback
$amazonAmount = $dom->filter('input[type="hidden"][name*="amount"]');
if ($amazonAmount->count() > 0) {
$prices[] = new PriceDTO(
minimum_discount_amount: 1,
price: $amazonAmount->first()->attr('value'),
currency_iso_code: $dom->filter('input[type="hidden"][name*="currencyCode"]')->first()->attr('value'),
);
}
}
$vendor_infos = [new PurchaseInfoDTO(