getCheapestPriceIds example

/** * {@inheritdoc} */
    public function getList(
        $products,
        ShopContextInterface $context,
        Group $customerGroup
    ) {
        /** * Contains the cheapest price logic which product price should be selected. */
        $ids = $this->getCheapestPriceIds($products$customerGroup);

        $query = $this->connection->createQueryBuilder();

        $query->select($this->fieldHelper->getPriceFields())
            ->addSelect($this->fieldHelper->getUnitFields());

        $query->from('s_articles_prices', 'price')
            ->innerJoin('price', 's_articles_details', 'variant', 'variant.id = price.articledetailsID')
            ->innerJoin('variant', 's_articles', 'product', 'product.id = variant.articleID')
            ->leftJoin('variant', 's_core_units', 'unit', 'unit.id = variant.unitID')
            ->leftJoin('price', 's_articles_prices_attributes', 'priceAttribute', 'priceAttribute.priceID = price.id')
            
Home | Imprint | This part of the site doesn't use cookies.