/** * Prepare filter for product grid. * * @return array */ protected function prepareFilter() { $productStatus = $this->product->getStatus() === null || $this->product->getStatus() === 'Product online' ? 'Enabled' : 'Disabled'; $filter = ['type' => $this->getProductType(), 'sku' => $this->product->getSku(), 'status' => $productStatus]; if ($this->product->hasData('attribute_set_id')) { $filter['set_name'] = $this->product->getAttributeSetId(); } return $filter; }