Change Manufactures name in multi store.

Posted: June 18, 2019 at 5:22 AM Quote #238098
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.

Example:

    @if (storeID = 1)
    {
        <div class="title">
            <strong>@T("Manufacturers")</strong>
        </div>
    }

    else

    {
        <div class="title">
            <strong>@T("Manufacturers2")</strong>
        </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)
Posted: June 19, 2019 at 2:46 AM Quote #238135
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
src\Presentation\Nop.Web\Factories\ProductModelFactory.cs

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:)
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)
www.SelectSystems.com.au
Select Systems International is a computer systems technology solution developer and integration service provider.
Posted: June 19, 2019 at 2:58 AM Quote #238136
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
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)
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