should I add values to web.config

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 anos atrás
I am interested in best practice and would like to know how I add configurable values when using nopCommerce?

In a standard MVC application I would add these to appsetting.json or web.config, how do I do this when using nopcommerce? (I'm hoping the answer is not putting something into the database)
4 anos atrás
Hello,

If you don't want to put in db than answare is appseting.json file over 4.0 version.

Below 4.0 , you can use web config
4 anos atrás
thanks, do I add an appsettings.json file to my plugin? or should I edit the existing one?
4 anos atrás
Adding configurable values in appsettings.json for plugin is very bad idea. You should add appsettings.json file to your plugin. Create nop startup class (INopStartup) and load the values at startup time.
4 anos atrás
thankyou
4 anos atrás
If you are working with new or existing plugin than add extra file to your plugin.

If you are working with source code than you should edit appsetting.json file.

That is the right way to doing and maintaining this stuff.
4 anos atrás
Plugin configure values should be saved in settings. That's the best practice. If you save values in appsettings.json or something like this files, you cannot change those unless you can access the server.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.