/** @param array $args */ public function onProductFilterBaseQuery(array &$args): void { if (!Shop::isFrontend()) { return; } try { $selection = VehicleSelectionService::getSelectionFromSessionOrCookie($this->getPlugin()); if (!$selection->hasAny()) { return; } $db = Shop::Container()->getDB(); $config = $this->getPlugin()->getConfig(); $svc = new VehicleProductFilterService( $db, (string)$config->getValue('merkmal_make'), (string)$config->getValue('merkmal_model'), (string)$config->getValue('merkmal_type'), (string)$config->getValue('merkmal_year'), (int)$config->getValue('include_no_vehicle_features') === 1 ); $conditionSql = $svc->buildConditionSql($selection); if ($conditionSql === '') { return; } // ✅ HOOK 253 liefert arrays – wir müssen in &conditions einhängen if (isset($args['conditions']) && \is_array($args['conditions'])) { $args['conditions'][] = $conditionSql; return; } // Fallback (falls je nach Version anders übergeben) foreach (['where', 'cWhere', 'whereSQL'] as $k) { if (isset($args[$k]) && \is_string($args[$k])) { $args[$k] = $this->appendWhere($args[$k], $conditionSql); return; } } foreach (['sql', 'cQuery', 'query'] as $k) { if (isset($args[$k]) && \is_string($args[$k]) && $args[$k] !== '') { $args[$k] = $this->appendWhereToSqlString($args[$k], $conditionSql); return; } } } catch (\Throwable $e) { // still } } Fahrzeugmarke: Audi T-Roc T-Roc R A1 A1, R ab 2016 Skoda 5FP Q2 Karoq
Philipp kaufte gerade
Maxton Design Spoiler CAP für Seat Leon FR ST Mk4 schwarz Hochglanz
aus Heinsberg
Lisa kaufte gerade
Hypercolor LED Innenraumleuchten Set für VW Polo 6R/6C - weiß
aus Arnstein OT Sandersleben