We need to create a custom CSV Magento 2 Export. In particular, we need to add a column (or an attribute in additional_attributes column) that indicate the attribute’s position inside the category it is inserted.

Is there a way to do this?


  • a product can belong to several categories. It does appear your question requires a custom function. Can you specify whether the issue you have is adding the new column or finding a way to output the product category? Commented May 7, 2018 at 15:15

1 Answer 1


ok, I have added a new product attribute that I named "test_category", then I associated this attribute to an attribute set. Finally, I edited a product with some data for this added attribute.
--> with the above, I can see my new product added automatically in the additional_attribute column for the product export feature as long as the product has data for this attribute.
--> now in a second step, it seems your blocker is that you need to create a script that assigns category position to this product attribute.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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