5

I'm working on a nopCommerce plugin project. nopCommerce is build on MVC4 using Razor Syntax.

I need to extend one of the partial view from plugin/extension I'm building. However, I can't think of how to do it technically.

Any idea, how to extend/replace one of the partial view from nopCommerce plugin/extension.

---- Update ----

I need to extend partial view (to be specific _productbox.cshtml) using a plugin that doesn't have controller.

I really do not need to override controller and its action method as it is not required for my plugin to work. I am doing some changes into a partial view template's markup and rest of the things are done by my javascript. So basically there is no point in extending controller or action method.

Any idea is highly appreciated.

Can you advise. Thanks for your response.

Thanks in advance.

Krunal
  • 2,967
  • 8
  • 45
  • 101
  • 1
    I think this may answer your question: http://www.pronopcommerce.com/3-ways-to-display-views-in-your-nopcommerce-plugins-embedded-resource-theme-override-and-custom-view-engine – romar May 07 '13 at 12:24
  • @romar Haha... Thanks for mentioning my article! :D – wooncherk May 07 '13 at 14:11
  • @wooncherk - Thanks for your article. It is very helpful. However, I need to extend partial view in a plugin that doesn't have controller. Can you advise. Thanks for your response. – Krunal May 08 '13 at 06:14
  • @romar for sharing this article link. – Krunal May 08 '13 at 06:14
  • @Krunal If you look at my code, it's already taken PartialView into consideration. :) – wooncherk May 08 '13 at 14:16
  • @woocherk Thank you for your update. I have just checked, but may be missed the part you're talking about. Can you point me to exact part you're referring to? I have to extend partial view from the plugin without actually using a controller. Please read my question to understand what I need to. Your help is highly appreciated. I will wait for your response. Thank you. – Krunal May 09 '13 at 04:49

1 Answers1

0

In Nop commerce has defined widget area in each page where we can place our partial view You can see Nop.Plugin.Widgets.NivoSlider plugin of nop commerce where they defined in widget location in this file NivoSliderPlugin.cs

like below

    public IList<string> GetWidgetZones()
    {
        return new List<string>() { "home_page_top" };
    }

"home_page_top" : parameter shows where you want display your plugin widget

Kishor T
  • 300
  • 1
  • 4
  • 15