/** @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 VW T-Roc T-Roc R A1 ab 2017 1060 kg Ateca 5FP GA
Philipp kaufte gerade
Maxton Design Spoiler CAP für Seat Leon FR ST Mk4 schwarz Hochglanz
aus Heinsberg
Florian kaufte gerade
Maxton Design Racing Front Ansatz V.1 / V1 für MAZDA 6 MK1 MPS
aus Lautzenhausen