Guide to Overriding NopCommerce Admin Views and Partial Views

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
CW@Thatz wrote:
Hey All,

I had a couple scenarios where I wanted to override some Nop admins views and was experimenting with the best way to do it.  I also saw some questions out there on various forums asking how to do this.  I thought I'd compile my findings into a blog post that walks you through how to override Admin Views and Partial Views with ease.

Check Out the Post Here

Please let me know what you think!

Hi I followed all the steps from http://alexwolfthoughts.com/overriding-nopcommerce-admin-views-and-partial-views

But the view is not overridden.
Using nopCommerce 3.80 currently.



Solution:
Step 1 – Create the Custom View Engine and inherit from ThemeableRazorViewEngine, instead of RazorViewEngine.

Step 2 - RouteProvider : IRouteProvider

Step 3 - Create a Controller

Step 4 - Create a view which is used to override + web.config

Step 5 - Create a .cs to and inherit from BasePlugin, IMiscPlugin

Here to download the source code.
7 years ago
Hello CW@Thatz

Your project is missing the controller. Could you please up load it?
6 years ago
[email protected] wrote:
No this is not the problem, the overridden partial view is copied to the output directory as expected,  but the view engine uses it  only if the original one is missing.


Sorry for resurrecting an old thread, but I'm having the exact same issue. Its definitely looking in my plugin's view directory first but will only display it if the base one is missing. I'm trying to override the _AddToCart.cshtml view.

Any tips?

Edit: I was following this guide
6 years ago
Can you post some of your code?
Since the linked tutorial works flawless on my side
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.