Manufacturers and category names in Admin are in random order. How to Order it by Ascending for A to

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 13 ans
For some reason the Manufacturers and category names in Admin are in random order. Where is the code located to update it to order by ASC?

Thank you.
Il y a 13 ans
They are ordered by 'Display Order' of appropriate entity (category or manufacturer)
Il y a 13 ans
Thanks for responding. I find it inconvenient. That means I have to go to each manufacturer and replace the order.
Is there a way to replace it with an ORDER BY ASC clause in a quick way?
Il y a 13 ans
You need to modify NopSolutions.NopCommerce.BusinessLogic.Categories.GetAllCategories() method

replace
var query = from c in context.Categories
                        orderby c.DisplayOrder
                        where (showHidden || c.Published) &&
                        !c.Deleted &&
                        c.ParentCategoryId == parentCategoryId
                        select c;

with
var query = from c in context.Categories
                        orderby c.Name
                        where (showHidden || c.Published) &&
                        !c.Deleted &&
                        c.ParentCategoryId == parentCategoryId
                        select c;


The same for manufacturers (ManufacturerManager)
Il y a 13 ans
Great. Thank you!
Il y a 13 ans
Can you please also address the following issues I am having:
https://www.nopcommerce.com/boards/t/5853/upgrading-to-v-17-created-duplicate-records-for-some-products-that-dont-delete.aspx

https://www.nopcommerce.com/boards/t/5852/getting-a-systemnullreferenceexception-error-in-17-if-thre-is-no-picture-in-product-variant.aspx
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.