SMS notifications in Shop-Script

Notifications on various actions performed with orders in Shop-Script can be sent to the store administrator and online shoppers as text messages (SMS) to their cell phones. To enable the sending of such text messages, you need to install and set up an SMS gateway integration plugin and create notifications for various actions (events) in the settings screen of Shop-Script as described below.

1. Install a plugin

Choose and install an SMS gateway integration plugin in section “Plugins → SMS” of the Installer app.

The settings fields of such a plugin are available in Shop-Script backend screen “Settings → General settings”, section “SMS”. Upon installation of a plugin, open that settings screen to see which fields you will need to complete after the registration on the website of an SMS provider.

2. Sign up for an SMS gateway account

Upon the signup, copy the values from your registered account to paste them in Shop-Script settings fields.

You may need to create sender IDs in your SMS gateway account, each ID being a string of 11 or less characters which will be displayed as sender name in recipients' phones; e.g., you may specif your store's name as a sender ID. If you a managing multiple storefronts on different domain names with one copy of Shop-Script, then it might be convenient to create several sender IDs, one for each storefront.

If you do not set up sender IDs, then some default ID may be used by your SMS gateway provider; e.g., your phone number or registered username (check if a default sender ID is provided by your provider).

3. Set up SMS gateway integration in Shop-Script

Open Shop-Script backend screen “Settings → General settings” and paste integration parameters copied from your SMS gateway account into the provided fields for the appropriate SMS plugin. These might be sender IDs and an account ID (api_id) or username and password. The exact set of integration settings fields may differ from plugin to plugin.

If you have set up more than 1 sender ID in your SMS gateway account, then you should enter them in the “Sender IDs” field in Shop-Script settings, each on a separate line.

If you have not set up sender IDs in your SMS gateway account, then you may not need to any sender ID in Shop-Script settings and may leave the “Sender IDs” field empty or specify an asterisk (*). In this case the default sender ID will be provided by your SMS gateway. Check that your SMS gateway does provide a default sender ID! Otherwise you need to specify at least one sender id in Shop-Script settings, even if you are planning to use only one sender ID to send notifications from your online store.

Note that each sender ID may be specified for only one SMS gateway integration plugin. If you have installed several SMS plugins, then you must not specify the same sender IDs for more than one plugin.

4. Create notifications in Shop-Script

Open Shop-Script backend screen “Settings → Notifications” and create notifications for all necessary events; e.g., order placed, order paid, comment to order added, etc.

If you add new order actions in backend screen “Settings → Order states”, then these actions will become available in the event list to choose from when you set up SMS notifications. This will enable you to perform any additional actions in your store's backend and automatically notify your customers thereof.

When creating an SMS notification, choose “SMS“ as transport.

Choose from the “Order source” list for which orders you need to set up a notification: a) all orders, b) only for orders created by the administrator in the backend, or c) orders placed by online shoppers in one of your storefronts, it may be convenient to choose this option if you have more than one storefront set up in the Site app.

Choose from the “Send from” list which sender ID you want to be displayed in recipients' phones:

  • default sender ID of your SMS gateway provider (if available),
  • one of the sender IDs which you have set up in your SMS gateway account and saved in the “Sender IDs” field of Shop-Script settings,
  • (other) sender ID which you have set up in your SMS gateway account and have not specified it in Shop-Script settings.

Specify the recipient:

  • Customer: Text message will be sent to customer's phone number specified during the checkout or registration.
  • Store admin: Text message will be sent to the phone number specified in settings field “Settings → General settings → Phone number”)
  • Other: Enter an arbitrary phone number in the format +ххххххххххх to make text messages be sent to that additional number.
Should you need to set up a notification to be sent to several phone numbers, set up several notifications with the same contents and specify different recipients for them.

Field “Content” by default contains a template of the message which may contain various variables to be replaced with actual values before sending. For example, the template for notifications of new orders contains variable {$}. This means that the recipient will receive a message containing his order number instead of the variable.

The complete list of available variables is available via the “Cheat sheet” link under the “Content” editing field.

In notification templates you can use any Smarty tools including Webasyst framework API, which is accessible via the $wa variable as in design templates and info pages. You can read more about editing Smarty templates in Webasyst framework in the developer documentation.

5. Test the sending

Upon completion of all fields and saving of a new notification, an additional button will appear under the “Content” editing field, which enables you to test the sending of the just created notification. Note that you need to have at least one paid or completed order to run the test sending.


    Add comment

    To add a comment please sign up or login

    Раздел помощи работает на основе приложения «Хаб»