The 5th annual nopCommerce conference will take place in India on the 10th-11th of October. Please find more about this event here

Displaying manufacturer logo on the product page...

1 2 >
Posted: September 15, 2016 at 5:12 PM Quote #175357
Hello

I have search the internet and i find nothing.
I want to add the manufactures logo instead of Manufacturer: Dewalt on the product page.
I´m using NopCommerce 3.6
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: September 15, 2016 at 8:31 PM Quote #175364
I think the model in this view has the picture info you need

\Presentation\Nop.Web\Views\Product\_ProductManufacturers.cshtml

This is from the ManufacturerAll view, so something similar can probably be used in above.

<div class="picture">
    <a href="@Url.RouteUrl("Manufacturer", new { SeName = item.SeName })" title="@item.PictureModel.Title">
        <img alt="@item.PictureModel.AlternateText" src="@item.PictureModel.ImageUrl" title="@item.PictureModel.Title" />
    </a>
</div>
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
www.noptools.com
Posted: September 16, 2016 at 10:47 AM Quote #175404
hello

Thanks for your answer...
I get this error :

Compiler Error Message: CS0103: The name 'item' does not exist in the current context
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: September 16, 2016 at 11:36 AM Quote #175405
niklas_73 wrote:
hello

Thanks for your answer...
I get this error :

Compiler Error Message: CS0103: The name 'item' does not exist in the current context


Try like bellow===>
DefaultClean File:~\Views\Product\_ProductManufacturers.cshtml


@model IList<ManufacturerModel>
@using Nop.Web.Models.Catalog;
   @{
        var pictureService = Nop.Core.Infrastructure.EngineContext.Current.Resolve<Nop.Services.Media.IPictureService>();
        var manufacturerService = Nop.Core.Infrastructure.EngineContext.Current.Resolve<Nop.Services.Catalog.IManufacturerService>();
    }

@if (Model.Count > 0)
{
    <div class="manufacturers">
        @if (Model.Count == 1)
        {
            <span class="label">@T("Products.Manufacturer"):</span>
        }
        else
        {
            <span class="label">@T("Products.Manufacturers"):</span>
        }
        <span class="value">
            @for (int i = 0; i < Model.Count; i++)
            {
                var item = Model[i];

                var manufacturer = manufacturerService.GetManufacturerById(item.Id);
                var pictureUrl = pictureService.GetPictureUrl(manufacturer.PictureId, 100);

                <a href="@Url.RouteUrl("Manufacturer", new {SeName = item.SeName})">
                    <img src="@pictureUrl" alt="@item.Name" title="@item.Name" />
                </a>
                if (i != Model.Count - 1)
                {
                <span class="separator">,</span>
                }
            }
        </span>
    </div>
}
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Need help-Algolia/Elastic Search| Customization| Plugins| Themes| Upgrade|Hosting|Consultancy| API? I’m just a click away!
Skype: [email protected]
Web: http://www.nop-station.com/
Posted: September 16, 2016 at 1:54 PM Quote #175410
hello

I get:
Parser Error Message: Only one 'model' statement is allowed in a file.

Line 103:                        @Html.Partial("_DeliveryInfo", Model)
Line 104:                        <!--product manufacturers-->
Line 105:                        @model IList<ManufacturerModel>
Line 106:@using Nop.Web.Models.Catalog;
Line 107:    @{


this is the text for manufactur in ProductTemplate.Simple.cshtml

<!--product manufacturers-->
@Html.Partial("_ProductManufacturers", Model.ProductManufacturers)
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: September 19, 2016 at 12:27 PM Quote #175529
I manage to fix the manufactures:

Do you have an ide how i can make likes this brand:
http://prntscr.com/cjw49v

Min lookes like this:
http://prntscr.com/cjw4yl

And how i can add the manufactures like this in the product list:
http://prntscr.com/cjw5j3

Hope someone can help me.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: October 04, 2016 at 2:44 PM Quote #176443
If you can't come up with a programmatic solution, you might consider altering your product photos to include the brand logos...or maybe even use one of the Watermark generators to have the brand logo appear as a watermark on each product photo??
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
An upvote on a helpful post means "thank you" in every language. I believe in this community. For every question I ask, I try to answer at least five others.
Posted: October 04, 2016 at 2:51 PM Quote #176446
Also, there are plugins which allow you to display all your brand logos in a carousel, and link to the manufacturer page/product list:
https://www.nopcommerce.com/extensions-and-themes.aspx?searchterm=manufacturers

...or in your top menu:
http://nop4you.com/nopcommerce-menu-responsive

https://www.nop-templates.com/mega-menu-plugin-for-nopcommerce
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
An upvote on a helpful post means "thank you" in every language. I believe in this community. For every question I ask, I try to answer at least five others.
Posted: October 04, 2016 at 3:05 PM Quote #176447
thanks i whill check this out.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: May 24, 2019 at 8:21 AM Quote #232361
sohel wrote:
hello

Thanks for your answer...
I get this error :

Compiler Error Message: CS0103: The name 'item' does not exist in the current context

Try like bellow===>
DefaultClean File:~\Views\Product\_ProductManufacturers.cshtml


@model IList<ManufacturerModel>
@using Nop.Web.Models.Catalog;
   @{
        var pictureService = Nop.Core.Infrastructure.EngineContext.Current.Resolve<Nop.Services.Media.IPictureService>();
        var manufacturerService = Nop.Core.Infrastructure.EngineContext.Current.Resolve<Nop.Services.Catalog.IManufacturerService>();
    }

@if (Model.Count > 0)
{
    <div class="manufacturers">
        @if (Model.Count == 1)
        {
            <span class="label">@T("Products.Manufacturer"):</span>
        }
        else
        {
            <span class="label">@T("Products.Manufacturers"):</span>
        }
        <span class="value">
            @for (int i = 0; i < Model.Count; i++)
            {
                var item = Model[i];

                var manufacturer = manufacturerService.GetManufacturerById(item.Id);
                var pictureUrl = pictureService.GetPictureUrl(manufacturer.PictureId, 100);

                <a href="@Url.RouteUrl("Manufacturer", new {SeName = item.SeName})">
                    <img src="@pictureUrl" alt="@item.Name" title="@item.Name" />
                </a>
                if (i != Model.Count - 1)
                {
                <span class="separator">,</span>
                }
            }
        </span>
    </div>
}


Hi SOHEL,

I tried your code in ver 4.2 Beta but got the following error can you help in this regard.

The model item passed into the ViewDataDictionary is of type 'System.Collections.Generic.List`1[Nop.Web.Models.Catalog.ManufacturerBriefInfoModel]', but this ViewDataDictionary instance requires a model item of type 'System.Collections.Generic.IList`1[Nop.Web.Models.Catalog.ManufacturerModel]'.

Thanks in advance
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
1 2 >
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.
eCommerce CONFERENCE 2019
Learn more