/** * {@inheritdoc} */ public function getAttributeId() { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getAttributeId'); if (!$pluginInfo) { return parent::getAttributeId(); } else { return $this->___callPlugins('getAttributeId', func_get_args(), $pluginInfo); } }
/** * @param FilterInterface $filter * @param string $query * @param Attribute $attribute * @return string */ private function processRangeNumeric(FilterInterface $filter, $query, $attribute) { $tableSuffix = $attribute->getBackendType() === 'decimal' ? '_decimal' : ''; $table = $this->resource->getTableName("catalog_product_index_eav{$tableSuffix}"); $select = $this->connection->select(); $currentStoreId = $this->scopeResolver->getScope()->getId(); $select->from(['main_table' => $table], 'entity_id')->columns([$filter->getField() => 'main_table.value'])->where('main_table.attribute_id = ?', $attribute->getAttributeId())->where('main_table.store_id = ?', $currentStoreId)->having($query); $resultQuery = 'search_index.entity_id IN ( select entity_id from ' . $this->conditionManager->wrapBrackets($select) . ' as filter )'; return $resultQuery; }