What are Shopify Scripts?
To the average merchant with little to no coding experience, Shopify Scripts might at first sound intimidating. After all, the term ‘scripts’ is synonymous with programming, coding and the development of web applications, and so it’s hardly surprising that some merchants look to enlist the help of a developer. However, this doesn’t have to be the case.
As described in Shopify’s documentation, Shopify Scripts are:
‘ ... small pieces of code that let you create personalised experiences for your customers in their cart and at checkout.’
The most common examples of Script usage include:
- Percentage discounts
- Fixed amount discounts
- Bulk discounts
However, the power of Shopify Scripts goes beyond just price manipulation. In fact, the various script types can be grouped into three main categories: Line item scripts, shipping scripts and payment scripts.
Line item scripts
Like the three examples given above, line item scripts give merchants the ability to manipulate the prices of items in their cart. These price changes can be dependent on a number of variables, including:
- The total cart value
- The quantity of a specific item
- A specific combination of items purchased together
- New customer discounts
- Specific customer group
Shipping scripts allow merchants to completely remove shipping costs or adjust them to a custom value, again, with the ability to do so dependent on the above variables.
Lastly, payment scripts offer a few niche uses. Merchants can use them to set up a particular payment method to display as the default method or remove the ability to use discount codes.
How are Scripts implemented?
Scripts are written, edited, managed and published using the Script Editor. In the editor, merchants are able to write their own unique scripts. The scripts themselves are written using a limited version of Ruby – a popular, general-purpose programming language – and they run on Shopify’s servers, so there’s no need to worry about the reliability of any third-party apps.
This might seem like the scary part, but fear not! Of course, a knowledge of Ruby will be helpful to those looking to create unique scripts, but for those with no programming knowledge, there’s a great variety of templates and examples available.
Shopify Scripts is a powerful tool capable of turning an online shopping experience into what can feel like a real, in-store shopping experience. Instead of relying on potentially troublesome third-party applications, merchants will find comfort in the knowledge that offers and discounts can be easily curated using Shopify Scripts. And for those with a little knowledge of Ruby – the sky is your limit!
To stay up to date with Thought and Mortar posts, follow us socially:
Upcoming articles in this series:
- Shopify Flow
- Plus-dedicated APIs
- Checkout customisation
- Plus support
- Shopify Payments
- When is the right time to upgrade?