In This Topic
Plug-ins
The AbleCommerce Plug-in manager is the gateway to new integrations, widgets, and customizations. Features of the plug-in framework include:
- New plugins can be placed in /plugins/ folder and each will be detected using the Refresh button on the plug-in manager page. This allows you to detect the plugin without needing an application restart.
- A plugin can provide NHibernate entities and mappings, and the application will detect it without needing additional configuration. Create .hbm.xml files and mark them as embedded resources within the plugin project.
- A plugin can register/override repositories and services without needing any updates to the configuration file. Plugins can make use of the RegisterFor attribute to decorate repositories/services.
- A plugin can pin its title into the admin menu pointing to the Configuration URL value. This allows a plugin to have a place inside the admin menu. This can be achieved by using <ShowInAdminMenu>True</ShowInAdminMenu> element in PluginManifest.xml file.
- The plugin framework can output logging information to facilitate with debugging. This can be enabled by switching application logging level to INFO in /App_Data/log4net.config file.
Download Sample Plugin
There are two methods to download and install the plugin:
-
Download the compiled RandomQuotesPlugin.zip file and follow the "Plugin Deployment" instructions in the following section of this document, or . . .
-
Plugin Deployment
This will install a sample plugin that contains the Random Quotes widget. A menu item will be created for configuration.
- Place the compiled version of RandomQuotesPlugin.zip file in the Website/Plugins folder.
- Login to the AbleCommerce Merchant Menu.
- Click on the Plugins menu item to view all available plugins.
- Press the Refresh button located in the upper-right corner of the page.
- Find the newly listed plugin and install it.
- Click on the Third-Party menu item to view the Random Quotes configuration page.
- Enter a few random quotes using the Add button.
Widget Use
The new widget should appear on the widget toolbar within the General section. In order to use this widget, just drag it from the sidebar into a suitable area on a page. It will display one of the quotes that you've entered through the configuration page.
Testing Notes
Any plugin that is installed will have its DLL version information listed under the Help > About page.
To enable error logging, edit the Website/App_Data/log4net.config file as shown:
Find Code:
<root>
<level value="WARN" />
<appender-ref ref="RollingLogFileAppender" />
</root>
Replace with Code:
<root>
<level value="INFO" />
<appender-ref ref="RollingLogFileAppender" />
</root>
Save the file and restart the application. The plugin framework will output the details about actions being performed into the application log file located Website/App_Data/app.log or by viewing the Help > Error Log page from within the Merchant Administration.