i have already tried to make the chanage of sort by price to custom attribute in admin store configuration but still the products are sorting by price in magento 2

1 Answer 1


Make sure Gtin attribute set as use in product sorting to Yes in Store > Attribute add edit Gtin attribute and check this

change Store > Configuration > Catalog > Storefront > Product Listing Sort By to Gtin

also got to Catalog > Manage Category and edit the category in which you want to change sorting and make sure here Default Product Listing Sort By option set to Gtin

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.