private function queryAddWrhsPrice($query)
    {
        $asCatInv = $this->getAliasForCataloginventoryTbl($query);
        if ($asCatInv) {
            /* there is 'cataloginventory_stock_item' table - we can JOIN our tables to get warehouse price  */
            /* LEFT JOIN prxgt_wrhs_stock_item */
            $tbl = $this->resource->getTableName(EStockItem::ENTITY_NAME);
            $as = self::AS_WRHS_STOCK_ITEM;
            $cols = [AWrhsProd::A_PRICE_WRHS => EStockItem::A_PRICE];
            $cond = "$as." . EStockItem::A_STOCK_ITEM_REF . "=$asCatInv." . Cfg::E_CATINV_STOCK_ITEM_A_ITEM_ID;
            $query->joinLeft([$as => $tbl], $cond, $cols);
        }
    }
private function queryAddWrhsPrice($query)
    {
        $asCatInv = $this->getAliasForCataloginventoryTbl($query);
        if ($asCatInv) {
            /* there is 'cataloginventory_stock_item' table - we can JOIN our tables to get warehouse price  */
            /* LEFT JOIN prxgt_wrhs_stock_item */
            $tbl = $this->resource->getTableName(EStockItem::ENTITY_NAME);
            $as = self::AS_WRHS_STOCK_ITEM;
            $cols = [AWrhsProd::A_PRICE_WRHS => EStockItem::A_PRICE];
            $cond = "$as." . EStockItem::A_STOCK_ITEM_REF . "=$asCatInv." . Cfg::E_CATINV_STOCK_ITEM_A_ITEM_ID;
            $query->joinLeft([$as => $tbl], $cond, $cols);
        }
    }
private function queryAddWrhsPrice ( $ query ) { $ asCatInv = $ this -> getAliasForCataloginventoryTbl ( $ query ) ; if ( $ asCatInv ) { /* there is 'cataloginventory_stock_item' table - we can JOIN our tables to get warehouse price  */ /* LEFT JOIN prxgt_wrhs_stock_item */ $ tbl = $ this -> resource -> getTableName ( EStockItem :: ENTITY_NAME ) ; $ as = self :: AS_WRHS_STOCK_ITEM ; $ cols = [ AWrhsProd :: A_PRICE_WRHS => EStockItem :: A_PRICE ] ; $ cond = "$as." . EStockItem :: A_STOCK_ITEM_REF . "=$asCatInv." . Cfg :: E_CATINV_STOCK_ITEM_A_ITEM_ID ; $ query -> joinLeft ( [ $ as => $ tbl ] , $ cond , $ cols ) ; } }
Add warehouse price to query if original query contains attribute 'price'.

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