Problem with override views in Shared folder NopCommerce 4.0

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
Hello guys,

i have problem with override views in Shared folder in Nop Commerce 4.0

in my case I have to overrite the OrderSummary method that is found in View / Shared / Components / OrderSummary / Default.cshtml

What I do is, as I normally do...

In the class that inherits IViewLocationExpander, i set

viewLocations = new string[] {
                    $"/Plugins/Misc.NavTech.CatalogData/Views/Shared/Components/OrderSummary/{{0}}.cshtml",
                    $"/Plugins/Misc.NavTech.CatalogData/Views/ShoppingCart/{{0}}.cshtml"
                }.Concat(viewLocations);

In this case ShoppingCart - work.
OrderSummary - dont work.


What are you going to advise me about?
5 years ago
You can play with order in dependency register file.
5 years ago
i.petk0v wrote:
Hello guys,

i have problem with override views in Shared folder in Nop Commerce 4.0

in my case I have to overrite the OrderSummary method that is found in View / Shared / Components / OrderSummary / Default.cshtml

What I do is, as I normally do...

In the class that inherits IViewLocationExpander, i set

viewLocations = new string[] {
                    $"/Plugins/Misc.NavTech.CatalogData/Views/Shared/Components/OrderSummary/{{0}}.cshtml",
                    $"/Plugins/Misc.NavTech.CatalogData/Views/ShoppingCart/{{0}}.cshtml"
                }.Concat(viewLocations);

In this case ShoppingCart - work.
OrderSummary - dont work.


What are you going to advise me about?


Once check this.

You should increase priority of your location in view override code..!!

Then check works or not..!!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.