- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
product position in the category
HI
How to change the position in bulk? there are many products in the category.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: product position 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
Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: product position in the category
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: product position in the category
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