What is the Shopify Scripts Editor?
Jan 18th, 2022
Shopify Scripts is code that runs at checkout to provide an improved customer experience. The primary use case is to automatically apply a discount at checkout based on items in the cart. Shipping scripts and payment scripts allow you to modify the shipping options and payment options respectively.
Automatically applying a discount at checkout reduces friction, increases conversion rates, and reduces customer support inquiries for customers saying they forgot to apply a discount code.
Some of the most common examples include
- Tiered Discounting (example: Spend $50 get 10% off, Spend $100 get 15% off)
- Volume-based price breaks
- Reordering or hiding shipping/payment options
3 Types of Shopify Scripts
1. Shopify Line Item Scripts
Line item scripts let you change the price of products or apply a discount based on what is in the cart.
The biggest misunderstanding is many merchants try to use Shopify to add new items into the cart.
If you are trying to do a Buy 1 Get 1 Free offer then a shopper will need to add both items into the cart. Then, at checkout, the line item Shopify script will execute showing the 1 item to be full price and the second item to be free.
If you are looking for a way to automatically add the second free item into the cart to further improve the customer experience then you will require the cart.js library in addition to the Shopify Script.
Cart.js can add/remove items to a cart. Line item scripts can apply the discounting.
2. Shopify Shipping Scripts
Shipping scripts let you change shipping methods and offer discounts on shipping rates.
Some of the best use cases here are offering your VIP customers free next-day shipping within the United States or $5 flat shipping (compared to $10 flat shipping for everyone else).
Free shipping is known to increase conversion rates.
It is recommended to not only use a shipping script to offer free shipping but make sure to add the necessary details so that your customers know they got it for being a VIP.
3. Shopify Payment Scripts
Payment scripts let you reorder, rename and hide payment gateways based on the customer or the items in the cart.
Good use cases for Shopify payment scripts include offering e-transfer for local customers, wire transfer for wholesalers, and crypto payments for orders less than $100. Another popular use case is hiding payment gateways for specific countries.
Even though Shopify payment scripts are least commonly used among the three types of Shopify scripts there are definitely use cases that help Shopify Plus stores avoid complications, especially when using a single storefront to serve multiple countries.
More Shopify Script Examples
Shopify Scripts are a great way to help with edge cases to improve customer experience. If you are curious to learn more check out our Shopify Checkout Scripts article where you can copy and paste 17 Shopify checkout scripts for your own Shopify Plus store.