1

When we export product detail in magento at time "No Valid Data Send" message display. How to solve it?

0

This error generate when in some data from database was not returned. i.e., if specific product has not selected category. In my Scenario, it was not returning category.

Change in product.php

/ImportExport/Model/Export/Entity/Product.php

(I will prefer to extend this file in your local pool)

protected function _updateDataWithCategoryColumns(&$dataRow, &$rowCategories, $productId)
{
    if (!isset($rowCategories[$productId])) {
        return false;
    }

    $categoryId = array_shift($rowCategories[$productId]);
    $dataRow[self::COL_ROOT_CATEGORY] = $this->_rootCategories[$categoryId];

    if (isset($this->_categories[$categoryId])) {
        $dataRow[self::COL_CATEGORY] = $this->_categories[$categoryId];
    }

    return true;
}

replace code of line

protected function _updateDataWithCategoryColumns(&$dataRow, &$rowCategories, $productId)
{
    if (!isset($rowCategories[$productId]) or empty($rowCategories[$productId])) {
        return false;
    }

    $categoryId = array_shift($rowCategories[$productId]);
    $dataRow[self::COL_ROOT_CATEGORY] = $this->_rootCategories[$categoryId];

    if (isset($this->_categories[$categoryId])) {
        $dataRow[self::COL_CATEGORY] = $this->_categories[$categoryId];
    }

    return true;
}

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.