Reto Cossalter
2019-03-21T10:58:32Z
Is there a way to display the manufacturer on the product detail page?
As far as I see this information is not available in ProductPageViewModel
Any pointers?

Regards
Reto
Will Strohl
2019-03-21T16:19:04Z
You won't find the Manufacturer directly referenced in the SingleProductViewModel class, but you have what you need to display it already there.

@Model.Item.ManufacturerId 


Then, use the appropriate controller class to query for and display the manufacturer details you're interested in.
Will Strohl, Upendo Ventures
Hotcakes Cloud  | Get Support  | Code Support 
Official Cloud & Support provider for Hotcakes
Reto Cossalter
2020-08-20T08:57:18Z
Just for anyone looking for a solution to this I will quickly summarize what we ended up to do:

Create a new view within your Viewset in the following folder: Views/Shared/_manufacturer.cshtml
Add the following code

@model Hotcakes.Modules.Core.Models.ProductPageViewModel

@functions{
    private string DisplayName(){
        var m = HccApp.ContactServices.Manufacturers.Find(Model.LocalProduct.ManufacturerId);
        return m.DisplayName;
    }
}

@Html.Raw(DisplayName())

Change _ProductDetails.cshtml and the new partial view wherever you want:

@Html.Partial("_manufacturer", Model)

This will render the manufacturer name.
Will Strohl
2020-08-20T19:32:01Z
FYI...

https://github.com/Hotca...commerce-core/issues/311 
Will Strohl, Upendo Ventures
Hotcakes Cloud  | Get Support  | Code Support 
Official Cloud & Support provider for Hotcakes
Reto Cossalter
2020-08-21T05:47:50Z
Great News!
Thanks
Loading
  • Sign-up for the Hotcakes Community Newsletter: