Producers/Manufacturs - sort by name?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
один год назад
Hi!
it's be great if Nopcommerce Team add in the producers sort by name. On the left menu, and the "all producers" page.

Maybe in producers page also give there possibility to sort by "order" like we have in category page.


What you think?
один год назад
Thanks, we'll leave this for customization.
"DisplayOrder" is used for sorting, you can set it so that manufacturers sort by name.
один год назад
I think I'd agree that rather than the ThenBy on Id:
public virtual async Task<IPagedList<Manufacturer>> GetAllManufacturersAsync(string manufacturerName = "",
...
        return query.OrderBy(m => m.DisplayOrder).ThenBy(m => m.Id);

the 'default' should be
  .ThenBy(m => m.Name)

(There are some places where that is the case, E.g. Country, Pickup Points.  I'd think it should be the default for any entity having 'Name')
один год назад
RomanovM wrote:
Thanks, we'll leave this for customization.
"DisplayOrder" is used for sorting, you can set it so that manufacturers sort by name.


Hi!
but i don't talking about how to show products in manufactures pages.

I talking about left menu with categories / manufactures and page with producers etc. There should be sorting by name, without this is hard to find a correct one... of course we can use orderby... but if we have 100 producers and add 101 which should have position 20... so we need in another 80 change their orderby ;/ t show it in alfabetic order.
один год назад
"producers"??  Do you mean "Products"

It's the same issue I mention above - e.g. code reads
...  products.OrderBy(product => product.DisplayOrder).ThenBy(product => product.Id);

(And same as above, I'd think that  ThenBy...Name would make more sense ;)
один год назад
New York wrote:
"producers"??  Do you mean "Products"

It's the same issue I mention above - e.g. code reads
...  products.OrderBy(product => product.DisplayOrder).ThenBy(product => product.Id);

(And same as above, I'd think that  ThenBy...Name would make more sense ;)


I have on mind a Manufacturers - i have them set all 0 display (default), and it's random sorting (or adding number). Effect it's a random position for each manufacturers. Looking in this is really hard... also we don't have "search" option, so... this feature is useless in UX.

And yes, your solution is better. General manage order products in category it's a really complicated. I think nopcommerce should more talking with end users nopcommerce (like me :P) and less with developers. There is a lot missing functionality and places, where nopcommerce don't give solution.

Example:
Cross selling / newest products / bestsellers... there is no option to don't show this products when out of stock. All plugins use nopcommerce default source... and sometimes we have 5 on 5 products out of stock showed, and another 5 bestseller are missing (no space) with on stock. I asking few developers about this and the only solution is unpublish product... but it's a wrong for SEO solution... and we have lots of plugins use this source... and all have same problem.
один год назад
Zyje_sobie wrote:
...i have them set all 0 display (default), and it's random sorting (or adding number).


It's not "random", it's using  OrderBy(m => m.DisplayOrder).ThenBy(m => m.Id);
The "Id" is the primary key column in the database table.  It's automatically incremented as new entities are added to the table in the  database.

You will need to use the DisplayOrder, as that is what it was designed for.

(As to any other issues / feedback, lease create a new topic :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.