/** @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, R 1060 kg ab 2016 Seat Audi
Thomas kaufte gerade
Tieferlegungsfedern HA für Vogtland Gewindefahrwerk VW Polo 6R/ 6C
aus Chemnitz
Ralf kaufte gerade
2x W21/5W W21W T20 Audi Seat VW Tagfahrlicht Xenon
aus Nürnberg