Knowledge Base

Welcome to the SmarterCommerce documentation portal

What can we help you find?

SMARTERCOMMERCE

Search and Learn about Unified Commerce and Our SmarterCommerce Solutions
Digital Commerce Additional Manual

How to Use This Plugin


To use this plugin, it is important to be aware of the Police List and think about what combination of those permissions will provide you the effect of hide you want, for instance, let´s supose you have a div tag related with Shipping Options, you should think:

“I want to hide this div if the user doesn´t have, for example, viewShipTo and addShipTo, a combination of some of those with another permission or if they only have access for one?”

Include the plugin, you can refer it in the Sitefinity backend following the next steps:

a. Go to your page

b. Drag and drop the Javascript widget

c. Edit the widget and select the “Link to JavaScript file” option and select the sc-jquery.common.js (Navigate to ResourcePackages/Bootstrap4/MVC/Scripts)

 

d. Click on Save.

e. Add the class "scj-permission-validator" and use the three data attributes on the tag you are going to use the plugin.

Example:

<div class="scj-permission-validator" data-scj-permission-list="[EBPAD, EBPAD]" data-scj-or-validator="false" data-shopping-url="https://nbonillacrpc.premierway.com/SitefinityDev"><button>button Permissions</button></div>

Call the plugin with the class ="scj-permission-validator", as the example below

$(document).ready(function () {

     $(".scj-permission-validator", "body").permissionValidator();

 


Notes:

  1. Refer your jquery file on the Sitefinity page.
  1. For more information look https://www.progress.com/documentation/sitefinity-cms/for-developers-add-jquery-resources-and-other-libraries
  2. Using the body, will apply the plugin functionality for whole the divs with the class there.

Bring It All Together

We bring together digital commerce, retail and call center channels with a united approach that leverages the power of onmi-channel while prioritizing JD Edwards connectivity.

CONNECT WITH AN EXPERT