The JSMA portal provides functionality for handling portals
What can JSMA portal do for me?You could easily use the JSMA portal to edit a portal |
Here is an example on how to write data to a JSMA portal:
... portal.set(key, value, [options]); ... |
Here is an example on how to read data from a JSMA portal:
... var activePaymentMethods = portal.activePaymentMethods; ... |
The JSMA portal provides the following methods:
Returns a string-array with all the delivery methods, that are currently active
... var activeDeliveryMethods = portal.activeDeliveryMethods; ... |
Returns a string-array with all the payment methods, that are currently active
... var activePaymentMethods = portal.activePaymentMethods; ... |
Returns the backend password of the portal
... var backendPW = portal.backendPassword; ... |
Returns the backend type of the portal
... var backendType = portal.backendType; ... |
Returns the backend url of the portal
... var backendUrl = portal.backendUrl; ... |
Returns the backend user of the portal
... var backendUser= portal.backendUser; ... |
Returns whether IBS is enabled for the portal
... portal.ibsActive # => true / false ... |
Returns the IBS base URL setting of the portal.
... var url = portal.ibsBaseURL; # => 'https://...' ... |
Returns the IBS user setting of the portal.
... var userName = portal.ibsUser; # => 'IBS-Username' ... |
Returns the IBS password setting of the portal.
... var password = portal.ibsPassword; # => 'IBS-password' ... |
Clones the portal and returns the copy as a JSMA portal.
This entity is slice aware, which means that to use this facility:
|
... var clonedPortal = portal.clone() // => portal ... |
Returns a string that you can use in the fragment cache. This string will change whenever the portal or one of its product associations is changed.
... portal.cacheKey # => "12589387317632578294" ... |
Returns the flex attributes of the portal
... var portalFlexAttributes = portal.flexAttributes; ... |
Returns the value of key as string or null if no value is set under the key.
... portal.get(key) ... |
The key to be looked up in the flexAttributes of the order.
Returns a boolean value depending on whether key is present for a given portal
... if (portal.has("description") === true) { ... } ... |
The key to be checked in the flexAttributes of the order.
Returns the host for a given portal
... var host = portal.host; ... |
Returns the id of a given portal
... var portalId = portal.id; ... |
Increments the vale of a given key by one.
... portal.increment(key) ... |
The key to be incremented in the flexAttributes of the portal.
Returns the name of the portal
... var portalName = portal.name; ... |
Returns the path of the portal
... var portalName = portal.path; ... |
Returns the regions of the portal
... var portalRegions = portal.regions; ... |
Removes the key from the flexAttributes of the portal
... portal.remove(key); ... |
The key to be removed from the flexAttributes of the portal
Sets the value of a specified key for a given portal
... portal.set(key, value, [options]); ... |
The key to be set in the flexAttributes of the portal.
The value to be set for the key
May have a key 'broadcastEvent':bool which determines whether the log message shows up in the websocket log view.
Returns the vat
... var vat = portal.vat; ... |