1. Home
  2. Samba Enterprise
  3. Script Manager
  1. Home
  2. Extra
  3. Script Manager

Script Manager

This post is also available in: Czech

Script Manager allows you to embed any JavaScript code directly to Samba. There are no boundaries when it comes to its usage: you can use it to create pop-up windows on your e-shop or to add new elements to the editor, for example. JavaScript knowledge is required, though, and should you have any problems with the implementation, please consult your IT team.

From the Samba’s main menu, choose “Script Manager”. There you will be able to edit existing script containers or create completely new ones.

Click on “Add container”, set the name of the container and insert your JS script. For example:

We’ve added a script into our container, which will show a text message “This is a test script” on our e-shop.

Once you add the script, you can save it as a template by clicking Save draft, or directly publish it using the Publish button. For this demonstration, we will use the Save draft button.

After saving, return to the main dashboard of the Script Manager where we can work with all previously created scripts, as previously mentioned. You can now click on the drop-down menu (next to the script’s name) and here we have the option to Share the script or simply Delete it.

If you want to test your script, simply use the Test button. This way, we can find out how the script behaves in a real-life environment without actually changing anything on the e-shop.

You can see the script ID in the test environment. From here, you can also share a link directly to this test environment using the Copy activation link button.

You can use the example below (under the button Exit Popup) to see what you can do with your e-shop. Feel free to use this script for your own e-shop, of course.

This script will create a pop-up window on your e-shop, which will appear after pointing the mouse cursor to the close tab button in your browser.

This post is also available in: Czech

Updated on December 17, 2021

Was this article helpful?

Related Articles