aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bridges/IdealoBridge.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/bridges/IdealoBridge.php b/bridges/IdealoBridge.php
index f426a45c..7432f78a 100644
--- a/bridges/IdealoBridge.php
+++ b/bridges/IdealoBridge.php
@@ -152,14 +152,21 @@ class IdealoBridge extends BridgeAbstract
$PriceNew = $FirstButton->find('strong', 0)->plaintext;
// Save current price
$this->saveCacheValue($KeyNEW, $PriceNew);
+ } else if ($FirstButton === null) {
+ // In case there is no actual New Price delete the previous value in the cache
+ $this->cache->delete($this->getShortName() . '_' . $KeyNEW);
}
+
// Second Button contains the used product price
$SecondButton = $html->find('.oopStage-conditionButton-wrapper-text', 1);
if ($SecondButton) {
$PriceUsed = $SecondButton->find('strong', 0)->plaintext;
// Save current price
$this->saveCacheValue($KeyUSED, $PriceUsed);
+ } else if ($SecondButton === null) {
+ // In case there is no actual Used Price delete the previous value in the cache
+ $this->cache->delete($this->getShortName() . '_' . $KeyUSED);
}
// Only continue if a price has changed