0

In Magento v2.0.4 Admin Panel go to System > Data Transfer > Export then select Entity Type: Products.

At that point the filtering grid appears.

The first option is Categories corresponding to category_ids product attribute; the text field brings us to think we can filter on it, maybe specifying the comma-separated list of category IDs.

But it doesn't work.

Why?

0

The reason is that category_ids belongs to a special list of attributes which can't be used for filtering during export.

Here is where the list is defined:

// from magento/module-catalog-import-export
class Simple extends \Magento\CatalogImportExport\Model\Export\Product\Type\AbstractType
{
    /**
     * Overridden attributes parameters.
     *
     * @var array
     */
    protected $_attributeOverrides = [
        'has_options' => ['source_model' => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean'],
        'required_options' => ['source_model' => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean'],
        'created_at' => ['backend_type' => 'datetime'],
        'updated_at' => ['backend_type' => 'datetime'],
    ];

    /**
     * Array of attributes codes which are disabled for export.
     *
     * @var string[]
     */
    protected $_disabledAttrs = [
        'old_id',
        'tier_price',
        'category_ids',
        'has_options',
        'is_returnable',
        'required_options',
        'quantity_and_stock_status'
    ];
}

We can't comment out the category_ids attribute from the above array because it will throw an exception during the query build process.

I think that those attributes shouldn't appear in the filter options in the Admin Panel at least until a proper filter type will be implemented for that kind of attributes.

Hope it sheds some light on why filtering by categories doesn't work during export.

-1

This issue is resolved in Magento 2.2.2.

You can see, article to resolve this issue.

See this click here

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.