return array_shift($prices);
} /**
* {@inheritdoc}
*/
public function getList($products, ShopContextInterface
$context, Group
$customerGroup) { $ids =
[];
foreach ($products as $product) { $ids[] =
$product->
getVariantId();
} $ids =
array_unique($ids);
$query =
$this->connection->
createQueryBuilder();
$query->
select($this->fieldHelper->
getPriceFields());
$query->
addSelect('variants.ordernumber as number'
);
$query->
addSelect('GREATEST(price.from, variants.minpurchase) __price_from'
);
$query->
from('s_articles_prices', 'price'
) ->
innerJoin('price', 's_articles_details', 'variants', 'variants.id = price.articledetailsID'
)