Adding Manufacturer Detail Description under Product page

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 năm cách đây
Hi everyone ,

I want to add the Manufacturer description under the product which are belong that manufacturer.

Can anyone suggest a solution for me :)

Thanks,

Cem
8 năm cách đây
cemali wrote:
Hi everyone ,

I want to add the Manufacturer description under the product which are belong that manufacturer.

Can anyone suggest a solution for me :)

Thanks,

Cem



Hi,

You can do this with widget plugin or editing "\Presentation\Nop.Web\Views\Product\ProductTemplate.Simple.cshtml" view file.

Put "@Model.ProductManufacturers[0].Description" code somewhere in "ProductTemplate.Simple.cshtml" file.
8 năm cách đây
Hi calacula,

Thanks for the code, i added  @Model.ProductManufacturers[0].Description under the productcstml but it returns the html itself

like ,

<p>test description</p> <p><img src="/Content/Images/uploaded/abus-alarmli-kilit.jpeg" alt="" width="150" height="150" /></p>

Do you have any suggestion :)

Thanks,
Cem
8 năm cách đây
cemali wrote:
Hi calacula,

Thanks for the code, i added  @Model.ProductManufacturers[0].Description under the productcstml but it returns the html itself

like ,

<p>test description</p> <p><img src="/Content/Images/uploaded/abus-alarmli-kilit.jpeg" alt="" width="150" height="150" /></p>

Do you have any suggestion :)

Thanks,
Cem


Hi Cemali,

Sory my mistake!

Try this:

@Html.Raw(Model.ProductManufacturers[0].Description)
8 năm cách đây
Hi Calacula,

Thanks for your fast and perfect help :) , It work very good. I Think some others need it someday,

See you,

Cem
8 năm cách đây
Hi again,

Code works great but if a product have not manufacturer , page give error

How can we add an if condition ?


Thanks,
Cem
8 năm cách đây
cemali wrote:
Hi again,

Code works great but if a product have not manufacturer , page give error

How can we add an if condition ?


Thanks,
Cem


@if(Model.ProductManufacturers!=null){
Html.Raw(Model.ProductManufacturers[0].Description)
}

I think it will work.
8 năm cách đây
Hi Anik,


Code is not working if there is no manufacturer of the product actually,

But if there is a manufacturers page is not give error .

Any suggestion :)

Cem
8 năm cách đây
cemali wrote:
Hi Anik,


Code is not working if there is no manufacturer of the product actually,

But if there is a manufacturers page is not give error .

Any suggestion :)

Cem


Hi Cem,



@if(Model.ProductManufacturers.Any()){
Html.Raw(Model.ProductManufacturers[0].Description)
}
3 năm cách đây
How can i add for each product item in category page(grid and list) the manufacturer related to each product.

So I need to show for every product the manufacturer in product list.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.