Я сохранил custom_attribute (current_seller_id) в sales_order и sales_order_grid и одинаковые значения в столбцах обеих таблиц.Значение сохранения в коде sales_order приведено ниже.Я использую даже sales_model_service_quote_submit_before, что заказ на отправку и цитату
public function execute(\Magento\Framework\Event\Observer $observer)
{
$order = $observer->getData('order');
$quote = $observer->getData('quote');
$quoteItems = $quote->getItems();
foreach ($quoteItems as $quoteItem){
if ($quoteItem->getCurrentSellerId() != ""){
$items[]=$quoteItem->getCurrentSellerId();
}
}
$seller_ids=implode(',',$items);
$order->setCurrentSellerId($seller_ids);
return $this;
}
Теперь я хочу применить условие (Filter) на основе собственного custom_attribute (current_seller_id) Например, если продавец, у которого current_seller_id равен 2, тогда просто показатьте записи в порядке сетки, которая имеет значение 2. Я получу текущий идентификатор администратора через "\ Magento \ Backend \ Model \ Auth \ Session $ authSession