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 yıl önce
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 yıl önce
They are ordered by 'Display Order' of appropriate entity (category or manufacturer)
13 yıl önce
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 yıl önce
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 yıl önce
Great. Thank you!
13 yıl önce
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.