Ejemplo n.º 1
0
 /**
  * Validate selection of products for mass update
  *
  * @return boolean
  */
 protected function _validateProducts()
 {
     $error = false;
     $productIds = $this->attributeHelper->getProductIds();
     if (!is_array($productIds)) {
         $error = __('Please select products for attributes update.');
     } elseif (!$this->_objectManager->create('Magento\\Catalog\\Model\\Product')->isProductsHasSku($productIds)) {
         $error = __('Please make sure to define SKU values for all processed products.');
     }
     if ($error) {
         $this->messageManager->addError($error);
     }
     return !$error;
 }