Manufacturer List

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

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