private function queryAddWrhsGroupPrice($query)
    {
        $asCatInv = $this->getAliasForCataloginventoryTbl($query);
        if ($asCatInv) {
            $scope = $this->scope->getCurrentScope();
            /* there is 'cataloginventory_stock_item' table - we can JOIN our tables to get warehouse group price  */
            /* don't join warehouse group prices for collection in adminhtml mode */
            if ($scope == \Magento\Framework\App\Area::AREA_FRONTEND) {
                /* LEFT JOIN prxgt_wrhs_group_price */
                $tbl = $this->resource->getTableName(EGroupPrice::ENTITY_NAME);
                $as = self::AS_WRHS_GROUP_PRICE;
                $cols = [AWrhsProd::A_PRICE_WRHS_GROUP => EGroupPrice::A_PRICE];
                $cond = "$as." . EGroupPrice::A_STOCK_ITEM_REF . "=$asCatInv." . Cfg::E_CATINV_STOCK_ITEM_A_ITEM_ID;
                $query->joinLeft([$as => $tbl], $cond, $cols);
                /* filter by current customer group */
                $groupId = $this->getCustomerGroup();
                $byGroup = "$as." . EGroupPrice::A_CUST_GROUP_REF . '=' . (int)$groupId;
                $query->where($byGroup);
            }
        }
    }
private function queryAddWrhsGroupPrice($query)
    {
        $asCatInv = $this->getAliasForCataloginventoryTbl($query);
        if ($asCatInv) {
            $scope = $this->scope->getCurrentScope();
            /* there is 'cataloginventory_stock_item' table - we can JOIN our tables to get warehouse group price  */
            /* don't join warehouse group prices for collection in adminhtml mode */
            if ($scope == \Magento\Framework\App\Area::AREA_FRONTEND) {
                /* LEFT JOIN prxgt_wrhs_group_price */
                $tbl = $this->resource->getTableName(EGroupPrice::ENTITY_NAME);
                $as = self::AS_WRHS_GROUP_PRICE;
                $cols = [AWrhsProd::A_PRICE_WRHS_GROUP => EGroupPrice::A_PRICE];
                $cond = "$as." . EGroupPrice::A_STOCK_ITEM_REF . "=$asCatInv." . Cfg::E_CATINV_STOCK_ITEM_A_ITEM_ID;
                $query->joinLeft([$as => $tbl], $cond, $cols);
                /* filter by current customer group */
                $groupId = $this->getCustomerGroup();
                $byGroup = "$as." . EGroupPrice::A_CUST_GROUP_REF . '=' . (int)$groupId;
                $query->where($byGroup);
            }
        }
    }
private function queryAddWrhsGroupPrice ( $ query ) { $ asCatInv = $ this -> getAliasForCataloginventoryTbl ( $ query ) ; if ( $ asCatInv ) { $ scope = $ this -> scope -> getCurrentScope ( ) ; /* there is 'cataloginventory_stock_item' table - we can JOIN our tables to get warehouse group price  */ /* don't join warehouse group prices for collection in adminhtml mode */ if ( $ scope == \ Magento \ Framework \ App \ Area :: AREA_FRONTEND ) { /* LEFT JOIN prxgt_wrhs_group_price */ $ tbl = $ this -> resource -> getTableName ( EGroupPrice :: ENTITY_NAME ) ; $ as = self :: AS_WRHS_GROUP_PRICE ; $ cols = [ AWrhsProd :: A_PRICE_WRHS_GROUP => EGroupPrice :: A_PRICE ] ; $ cond = "$as." . EGroupPrice :: A_STOCK_ITEM_REF . "=$asCatInv." . Cfg :: E_CATINV_STOCK_ITEM_A_ITEM_ID ; $ query -> joinLeft ( [ $ as => $ tbl ] , $ cond , $ cols ) ; /* filter by current customer group */ $ groupId = $ this -> getCustomerGroup ( ) ; $ byGroup = "$as." . EGroupPrice :: A_CUST_GROUP_REF . '=' . ( int ) $ groupId ; $ query -> where ( $ byGroup ) ; } } }
Add warehouse group price to query if original query contains attribute 'special_price'.

@param $query
Add warehouse group price to query if original query contains attribute special_price .