1

I have added two columns in sales order grid table. But only one value is showing in that two column i don't know how to return multiple values in column, below code is prepareDataSource function inside that UI folder.

   public function prepareDataSource(array $dataSource)
{
    if (isset($dataSource['data']['items'])) {
        foreach ($dataSource['data']['items'] as & $item) {
            $order  = $this->_orderRepository->get($item["entity_id"]);
            $school_name = $order->getData('school_name');
            $seller_id = $order->getData('seller_id');
            if(empty($school_name))
            {
                $item[$this->getData('name')] = 'Default';
            }
            else
            {
                $item[$this->getData('name')] = $school_name;
            }
        }
    }
    return $dataSource;
}

I want to return that $seller_id please tell me how to return.

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.