Manufacturer List

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 13 años
Just trying to get a site configured up and have a problem with the manufacturer list.

I have a long list of them which all appear on the front page followed by a "View All" link. Is it possible to restrict this list to, say, 10 and see the rest only when the View All is clicked?
Hace 13 años
It'll require some customization. Look at \Modules\ManufacturerNavigation.ascx.cs control and replace
var manufacturers = ManufacturerManager.GetAllManufacturers();

with
var manufacturers = ManufacturerManager.GetAllManufacturers().Take(10);

P.S. Don't forget to recompile your application
Hace 13 años
Thanks, I'll take a look.
Hace 13 años
has this .take(10) been removed in 1.9?
Hace 13 años
dootchie wrote:
has this .take(10) been removed in 1.9?

No (it never was there)
Hace 13 años
when ever we recomplie which all dll files should we copy?
Hace 13 años
kakoli wrote:
when ever we recomplie which all dll files should we copy?


whenever i do "var manufacturers = ManufacturerManager.GetAllManufacturers().Take(10);" it says there is not such thing as "take"...what am i missing?
Hace 13 años
I have no idea, maybe somepne else answer this, also let me know which are the .dll files need to copy when when we recomplie..
Hace 13 años
dootchie wrote:
whenever i do "var manufacturers = ManufacturerManager.GetAllManufacturers().Take(10);" it says there is not such thing as "take"...what am i missing?

Ensure that System.Linq namespace is added at the top at the file ("using System.Linq;")


kakoli wrote:
which are the .dll files need to copy when when we recomplie..

In this case you need to copy only NopCommerceStore.dll
Hace 13 años
Very stargly i dont have
var manufacturers = ManufacturerManager.GetAllManufacturers();


following is what i have ..

var manufacturers = this.ManufacturerService.GetAllManufacturers();
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.