Can anyone tell me how to create a condition to change the Manufactures name by assigning different names depending on the loaded store. Nop4.2 multistore activated.
@if (storeID = 1)
So you are editing src\Presentation\Nop.Web\Views\Shared\Components\ManufacturerNavigation\Default.schtml
The data for the page is stored in ManufacturerNavigationModel
a property of which is ManufacturerBriefInfoModel which is populated in
protected virtual IList<ManufacturerBriefInfoModel> PrepareProductManufacturerModels(Product product) in
I am assuming you want to separate the the Manufactures into 2 lists but at the moment there is no access to the StoreId for each Manufacturer in the above models.
One way would be to add a new property StoreId in the ManufacturerBriefInfoModel then populate the new field when preparing the model then you would have access to it when you modify and build upon the existing functionality in the above page. Another way might be to pass in the StoreId into the control itself.
Without actually thinking about in more depth and coding it myself I cant be of more help, feel free to have a play, explore and understand the problem to build a solution:)
Thanks for the tips. I needed to have in the 2 sites manufacturers> authors and manufactures> publishers.
For now I have found a simpler solution by duplicating the language and associating it to the reference site each with its translation. Thank you