Manufacturer List

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 Jahre weitere
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?
13 Jahre weitere
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
13 Jahre weitere
Thanks, I'll take a look.
13 Jahre weitere
has this .take(10) been removed in 1.9?
13 Jahre weitere
dootchie wrote:
has this .take(10) been removed in 1.9?

No (it never was there)
13 Jahre weitere
when ever we recomplie which all dll files should we copy?
13 Jahre weitere
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?
13 Jahre weitere
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..
13 Jahre weitere
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
13 Jahre weitere
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.