HI
How to change the position in bulk? there are many products in the category.
Hello @alenwang9788
There is no such a quick way for that.
Either you need to edit via admin or you can check table catalog_category_product, you can update position into that table.
you can export that table and do necessary changes and import it
Hope it will help you
if works then mark as solution
Query:
SELECT catalog_product_entity_varchar.value, catalog_category_product.entity_id,catalog_category_product.position FROM catalog_product_entity_varchar left outer join catalog_category_product on catalog_category_product.entity_id = catalog_product_entity_varchar.entity_id WHERE attribute_id = ( SELECT attribute_id FROM eav_attribute WHERE entity_type_id=4 AND attribute_code='name' );
Export to excel & set the Position values to what you want
Add this formula in to column D to build the queries up:
="update catalog_category_product set position = "&C1&" where entity_id = "&B1&";"
TEST and run
Query to get current product names and positions:
SELECT catalog_product_entity_varchar.value, catalog_category_product.entity_id,catalog_category_product.position FROM catalog_product_entity_varchar left outer join catalog_category_product on catalog_category_product.entity_id = catalog_product_entity_varchar.entity_id WHERE attribute_id = ( SELECT attribute_id FROM eav_attribute WHERE entity_type_id=4 AND attribute_code='name' );
Export to excel
Add formula for column D top build queries
="update catalog_category_product set position = "&C1&" where entity_id = "&B1&";"
TEST and run