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.
13 năm cách đây
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.
13 năm cách đây
They are ordered by 'Display Order' of appropriate entity (category or manufacturer)
13 năm cách đây
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?
13 năm cách đây
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)
13 năm cách đây
Great. Thank you!
13 năm cách đây
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.