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.
Hace 13 años
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.
Hace 13 años
They are ordered by 'Display Order' of appropriate entity (category or manufacturer)
Hace 13 años
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?
Hace 13 años
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)
Hace 13 años
Great. Thank you!
Hace 13 años
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.