nopcommerce

NopCommerce MVC 插件机制分析

一笑奈何 提交于 2020-01-18 23:09:37
基本原理 插件话的应用程序一般都是先定义插件接口,然后把插件编译的dll放到固定的目录中,应用程序主程序通过加载那些实现了插件接口的dll来实现插件的使用。NopCommerce也是这样,但作为MVC Web应用程序会有一些不一样,首先是不同信任级别(Full Trust,Medium Trust)的时候加载dll的策略会有不一样,另外就是怎样显示插件中的View的问题。 放插件的文件夹 NopCommerce的插件放在网站主目录的Plugins目录下,Plugins下面有很多文件夹,一个插件类库就是一个文件夹。在插件类库中修改编译输出的地址为网站主目录的Plugins文件夹,这样插件生成的dll就能自动在目标文件夹下面。如下图: 另一个文件夹是ShadowCopy文件夹,就在Plugins/bin文件夹下。关于为什么要用ShadowCopy,住 这篇 文章中有所叙述,NopCommerce就是参考它的实现。里面也详细叙述了信任级别的问题。 网站启动 我们先来看PluginManager.Initialize方法。通过在PluginManager类上定义如下属性保证PluginManager的Initialize方法在网站开始的时候运行,早于Application_Start运行。 [assembly: PreApplicationStartMethod(typeof

Use different solr requesthandlers for different webpages

醉酒当歌 提交于 2020-01-17 12:26:44
问题 I am using solrnet. I have two handler. 1) /Default handler 2) /mysearch handler 1st one is used for few of webpages & 2nd one is used for other webpages. So, how can I use both of handlers for different webpages? Please advise me this is possible or not? 来源: https://stackoverflow.com/questions/29390870/use-different-solr-requesthandlers-for-different-webpages

Use different solr requesthandlers for different webpages

懵懂的女人 提交于 2020-01-17 12:26:04
问题 I am using solrnet. I have two handler. 1) /Default handler 2) /mysearch handler 1st one is used for few of webpages & 2nd one is used for other webpages. So, how can I use both of handlers for different webpages? Please advise me this is possible or not? 来源: https://stackoverflow.com/questions/29390870/use-different-solr-requesthandlers-for-different-webpages

Change the connection string of nopCommerce?

时光怂恿深爱的人放手 提交于 2020-01-13 20:30:11
问题 I am using nopCommerce and I need to remove the connection string in the settings.txt file and insert the web.config file. How can i do this? 回答1: The most straightforward way to move the connection string out of settings.txt and into the web.config is to modify the Nop.Core.Data.DataSettingsManager . Specifically the LoadSettings() and SaveSettings() methods. You can store the connection string wherever you'd like (ideally in web.config), as long as those two methods read and write the

SSL is not working in nopcommerce

寵の児 提交于 2020-01-05 05:33:16
问题 I have website www.perfecthomehealth.com on landing page i can see the proper secure (https) but when i move to another page like category or other Product page i am not able to see the secure. Can you guide me what is the missing and what i need to change in setting? 回答1: First you need to enable the SSL from Store setting hope you have already did. Then you have to enable "Force SSL for all site pages" from general setting. You must have the SSL certificate at server if not then your cart

Override @Html.Partial before it is rendered

旧时模样 提交于 2020-01-05 03:33:29
问题 I am rendering Partial view inside a parent view @Html.Partial("_OrderDetails.Info", Model) But is it possible to override _OrderDetails.Info partial view with another partial view before it is rendered ? Is there method to use while partial view is rendered like we do in ActionFilters , OnActionExecuting ? 来源: https://stackoverflow.com/questions/42920610/override-html-partial-before-it-is-rendered

The controller for path '/' was not found or does not implement IController. in nopCommerce

大兔子大兔子 提交于 2020-01-04 06:50:12
问题 I am trying to call an action in HeaderLinks.cshtml razor view. @Html.Action("SideMenu","Index") SideMenuController is in a plugin that i installed on nopCommerce. All routing is good. routes.MapRoute("Nop.Plugin.Other.SideMenu.Log", "sidemenu/index", new { controller = "SideMenu", action = "Index" }, new[] { "Nop.Plugin.Other.SideMenu.Controllers" }); But the view is showing an error - "The controller for path '/' was not found or does not implement IController." I also tried with that...

The controller for path '/' was not found or does not implement IController. in nopCommerce

試著忘記壹切 提交于 2020-01-04 06:49:25
问题 I am trying to call an action in HeaderLinks.cshtml razor view. @Html.Action("SideMenu","Index") SideMenuController is in a plugin that i installed on nopCommerce. All routing is good. routes.MapRoute("Nop.Plugin.Other.SideMenu.Log", "sidemenu/index", new { controller = "SideMenu", action = "Index" }, new[] { "Nop.Plugin.Other.SideMenu.Controllers" }); But the view is showing an error - "The controller for path '/' was not found or does not implement IController." I also tried with that...

Using JQuery to Disable Submit button and/or get Value of form action

做~自己de王妃 提交于 2019-12-25 07:49:54
问题 this question is two part. I am trying to do two things here depending on the users actions. I have a page that displays the shipping addresses if more than one exist in a button kind of list. If there are more than one address, more than one button will appear. The user also has the ability to enter in a new address. This is from NopCommerce checkout. What I would like to do, is if the user selects a particular address to use by clicking the button, then get that shipping information and

How to use caching in DependencyRegister(Nop.Web.Framework)

ぃ、小莉子 提交于 2019-12-25 05:06:32
问题 1) How can i use Caching in DependencyRegister.cs(Nop.Web.Framework)? 2) How can i get Current Login Customer in DependencyRegister.cs(Nop.Web.Framework)? i want to current customer id using for Caching and when we use _workcontext for customer in DependencyRegister its give Circular reference error please guide need help. regards, jatin 回答1: Sorry, you can't and you don't need it. Dependency registration happens only on nopcommerce start-up. 来源: https://stackoverflow.com/questions/24647672