addPropertyCondition example

class PropertyCriteriaRequestHandler implements CriteriaRequestHandlerInterface
{
    private Connection $connection;

    public function __construct(Connection $connection)
    {
        $this->connection = $connection;
    }

    public function handleRequest(Request $request, Criteria $criteria, ShopContextInterface $context)
    {
        $this->addPropertyCondition($request$criteria);
    }

    private function addPropertyCondition(Request $request, Criteria $criteria): void
    {
        $filters = $request->getParam('sFilterProperties', []);
        if (empty($filters)) {
            return;
        }

        $filters = explode('|', $filters);
        $filters = $this->getGroupedFilters($filters);

        
Home | Imprint | This part of the site doesn't use cookies.