Skip to content

Commit 373648e

Browse files
committed
MAGETWO-92896: To postpone the call $this->priceTableResolver->resolve in _construct
1 parent 856def3 commit 373648e

File tree

1 file changed

+12
-2
lines changed
  • app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter

1 file changed

+12
-2
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Price.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,19 @@ public function applyPriceRange(\Magento\Catalog\Model\Layer\Filter\FilterInterf
399399

400400
/**
401401
* Initialize connection and define main table name
402-
* @deprecated
402+
*
403403
* @return void
404404
*/
405405
protected function _construct()
406+
{
407+
$this->_init('catalog_product_index_price', 'entity_id');
408+
}
409+
410+
/**
411+
* {@inheritdoc}
412+
* @return string
413+
*/
414+
public function getMainTable()
406415
{
407416
$storeKey = $this->httpContext->getValue(StoreManagerInterface::CONTEXT_STORE);
408417
$priceTableName = $this->priceTableResolver->resolve(
@@ -418,7 +427,8 @@ protected function _construct()
418427
)
419428
]
420429
);
421-
$this->_init($priceTableName, 'entity_id');
430+
431+
return $this->getTable($priceTableName);
422432
}
423433

424434
/**

0 commit comments

Comments
 (0)