FAQ Database Discussion Community

Use a Nop Service outside of a controller?

I'm writing a custom validation attribute for validating zip\postal codes. For it to work I absolutely need to know the selected country. But it turns out to be surprisingly difficult to do. In most view models nop passes the country using its id, which means I need to decipher it....

Get current CategoryModel filled with data from Nop to my plugin

Could you please help me on the following? I am developing a plugin in nop commerce and I need to get the current CategoryModel from nop.web. How I can get it filled with the appropriate data into my plugin? I tried using the EngineContext.Current.Resolve<CategoryModel>(); but it fails.Hope it is clear....

Nop Commerce automatically redirecting to different URL

I am having a very peculiar issue. For some specific url nop website redirects to another url. For example - This is the url that is supposed to go - when clicked or even pasted in address bar, I debugged the code and in the application_beginrequest method notice the url...

How to return plain/text robots.txt in AngularJS

I want to return plain/text to http://domain.com/robots.txt asp.net mvc Common controller public ActionResult RobotsTextFile() { var disallowPaths = new List<string>() { "/bin/", "/content/files/", "/content/files/exportimport/", "/country/getstatesbycountryid", "/install", "/setproductreviewhelpfulness", }; var localizableDisallowPaths = new List<string>() { "/addproducttocart/catalog/", "/addproducttocart/details/", "/boards/forumwatch", "/deletepm", "/emailwishlist", "/inboxupdate", ... }; const string newLine = "\r\n";...

How to translate words in JS in multilingual website?

Am using nopCommerce, version 3.50. My site is multilingual: Russian, English, Espanol. There is a script for showing product images — magnific-popup. So, when you click on photo it appears in a script box (like fancybox) and there are some titles like "Loading.., Close (Esc), Next, Previous, 1 of 2"....

Access Country/State lists from NopCommerce plugin

Does Nop give you the ability to populate dropdown lists with country/state info? I realize that I could query the tables dbo.Country and dbo.StateProvince but was hoping for an easier solution

How to solve No parameterless constructor defined for this object error in Mvc?

I am creating one demo application to learn how to use repository pattern for performing Insert operation.I am using Nop Commerce**(http://www.nopcommerce.com) **code for repository pattern Error:No parameterless constructor defined for this object I have seen this link:MVC: No parameterless constructor defined for this object This is my Structure: My Repository...

I can't call Widget for a new Admin Plugin in NopCommerce

I Create a New plugin to manage back Office menus, I implement the interface IWidgetPlugin to create a new widget zone : public IList<string> GetWidgetZones() { return new List<string>(){ "ebm_MenuManager_BackOffice" }; } And I had called this widget zone from one view "_AdminLayout.csHtml" under Nop.Admin project with the extended helper...

Why repository pattern is extensively used in entity framework as though it is complex?

I am creating a demo project which contains crud operations using a repository pattern and dependency injection. This is my structure: Approach 1 (very popular, used by many developers) My repository interface: public partial interface IRepository<T> { void Insert(T entity); } My service layer: public partial interface IEmployeeService { void...

call json web api nopcommerce

Hi I am new for nopcommerce 3.5. I need to write a restful web service api to third party(for eg mobile) access the service. I know that we can access through Nop.Plugin.Misc.WebServices . I had enable the service from administrator site. But now is my question. How can i call...