2

I am creating a grid UI component and its collection and I need to join another table like:

$tableMKproduct = $this->_resource->getTableName('multivendor_product');
        $collection = $this->collection
                                ->addAttributeToSelect('*')
                                ->addFieldToFilter('entity_id',['in' => $productIds])
                                ->addOrder('created_at', 'desc');
        $collection->getSelect()->joinLeft(array('mk_product'=>$tableMKproduct),'e.entity_id = mk_product.product_id',array('mkproductstatus'=>"mk_product.status"));

However, I cannot filter or sort the joined table field.

1
  • Did you find a solution?
    – jennymo
    May 16, 2018 at 15:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.