/** @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 1090 kg T-Roc T-Roc R ab 2016 Seat 5FP GA NU - x2
Philipp kaufte gerade
Maxton Design Spoiler CAP für Seat Leon FR ST Mk4 schwarz Hochglanz
aus Heinsberg
Philipp kaufte gerade
Maxton Design Spoiler CAP für Seat Leon FR ST Mk4 schwarz Hochglanz
aus Heinsberg