getCheapestPriceAccessors example

'id' => 'cheapest_price',
                    'params' => $this->getCheapestPriceParameters($context),
                ],
            ]);
        }

        if ($this->isCheapestPriceField($sorting->getField(), true)) {
            return new FieldSort('_script', $sorting->getDirection(), null, [
                'type' => 'number',
                'script' => [
                    'id' => 'cheapest_price_percentage',
                    'params' => ['accessors' => $this->getCheapestPriceAccessors($context, true)],
                ],
            ]);
        }

        if ($this->keyValueStorage->get(ElasticsearchIndexer::ENABLE_MULTILINGUAL_INDEX_KEY, false)) {
            $field = $this->helper->getField($sorting->getField()$definition$definition->getEntityName(), false);

            if ($field instanceof TranslatedField) {
                return $this->createTranslatedSorting($definition->getEntityName()$sorting$context);
            }
        }

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