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.

  • Did you find a solution? – jennymo May 16 '18 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.