This post is also available in:
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 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.