Filtering a joined column

前端 未结 2 1949
小蘑菇
小蘑菇 2021-02-09 17:24

I am creating a stock report in the admin and have everything working so far, except that I can\'t seem to be able to filter on the joined column.

I have joined the stoc

2条回答
  •  南方客
    南方客 (楼主)
    2021-02-09 18:16

    After join simply use order to sort your result

    $collection->getSelect()
        ->join( array('stock'=>'ccmg_cataloginventory_stock_item'), 'e.entity_id = stock.item_id', array('stock.qty'))
        ->order('stock.qty ASC');
    

提交回复
热议问题