23 private $storeManager;
33 private $customerSession;
38 private $metadataPool;
43 private $baseSelectProcessor;
48 private $priceTableResolver;
53 private $dimensionFactory;
76 $this->customerSession = $customerSession;
77 $this->metadataPool = $metadataPool;
78 $this->baseSelectProcessor = (
null !== $baseSelectProcessor)
80 $this->priceTableResolver = $priceTableResolver
90 $linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();
91 $productTable = $this->resource->getTableName(
'catalog_product_entity');
92 $websiteId = $this->storeManager->getStore()->getWebsiteId();
93 $customerGroupId = $this->customerSession->getCustomerGroupId();
95 $priceSelect = $this->resource->getConnection()->select()
96 ->from([
'parent' => $productTable],
'')
98 [
'link' => $this->resource->getTableName(
'catalog_product_relation')],
99 "link.parent_id = parent.$linkField",
107 't' => $this->priceTableResolver->resolve(
'catalog_product_index_price', [
108 $this->dimensionFactory->create(WebsiteDimensionProvider::DIMENSION_NAME, (
string)
$websiteId),
109 $this->dimensionFactory->create(
110 CustomerGroupDimensionProvider::DIMENSION_NAME,
111 (
string)$customerGroupId
119 ->where(
't.customer_group_id = ?', $customerGroupId)
123 $priceSelect = $this->baseSelectProcessor->process($priceSelect);
125 return [$priceSelect];
const PRODUCT_TABLE_ALIAS
__construct(\Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\App\ResourceConnection $resourceConnection, \Magento\Customer\Model\Session $customerSession, \Magento\Framework\EntityManager\MetadataPool $metadataPool, BaseSelectProcessorInterface $baseSelectProcessor=null, IndexScopeResolverInterface $priceTableResolver=null, DimensionFactory $dimensionFactory=null)