The configuration

Each plugin may have a configuration. The entire configuration of your plugin is than managed in the novomind iSHOP backoffice. Each shop administrator that has the necessary permissions can make changes.

In the configureConfigurationTemplate method in the configurer the configuration gets registered.

Supported are the following configuration key types:

  • Simple types: Integer, Double, String, Boolean
  • File: The backoffice manager may upload files
  • Selection: The backoffice manager may select one of different options.

Configuration management

The allow configuration in your plugin, you have to register the configuration. This is done in the ishop section of the plugin manifest:

      <ishop:stringKey key="greeting" default="Hello World">
        <ishop:description locale="en">A greeting that this app displays</ishop:description>
      <ishop:booleanKey key="enableSpecialFeature" default="false">
        <ishop:description locale="en">Enable the special hidden feature of this app!</ishop:description>
        <ishop:description locale="de">Aktiviere das geheime Feature!</ishop:description>

Available key types

<ishop:stringKey key="greeting" default="Hello World">
  <ishop:description locale="en">A greeting that this app displays</ishop:description>
<ishop:booleanKey key="showMessage" default="false">
  <ishop:description locale="en">Whether the greeting should be displayed</ishop:description>
<ishop:selectableKey key="messages">
  <ishop:option>Hey there!</ishop:option>
  <ishop:option>Hello stranger!</ishop:option>
  <ishop:description locale="en">The greeting to show</ishop:description>
<ishop:fileKey key="picture" maxFileSize="1000" fileExtensions="jpg,png">
  <ishop:description locale="en">A picture to show next to the message</ishop:description>
<ishop:integerKey key="numberOfMessages" default="3">
  <ishop:description locale="en">How many messages should be shown</ishop:description>
<ishop:doubleKey key="messageFontSize" default="2.5">
  <ishop:description locale="en">The font size of the message in em</ishop:description>

Manage the configuration

Shop Managers can manage the configuration of all plugins in the backoffice. They need the administrative permission "apps" to do that.

Access the configuration


The PluginConfigurationService lets you access the configuration from java classes. It is a service managed by spring so it has to be injected into your class. It requires the current shopcontext which is usually available through the ApiShopContextFactory, that is also managed by spring.

pluginConfigurationService.getStringValue(apiShopContext, "twitter.apikey").orElse("MY-API-KEY");
pluginConfigurationService.getBooleanValue(apiShopContext, "twitter.debug").orElse(Boolean.FALSE);
pluginConfigurationService.getIntegerValue(apiShopContext, "twitter.history").orElse(10);


To access the configuration directly from the frontend, you can use the configTag.

<%@ taglib uri="" prefix="c" %>
<%@ taglib uri="" prefix="api" %>

<api:config key="twitter.apikey" var="apikey" />
<api:config key="twitter.debug" var="debug" />
<api:config key="twitter.history" var="history" />
<c:if test="debug">
  Using API-KEY: <c:out value="${apikey}" />
  Saving the last <c:out value="${history}" />  actions.