For merchants who are still using legacy Shopify Scripts for upsells and cross-sell widgets, this guide will provide an overview of how to create a Gift With Purchase Shopify Script using a script creator.
NOTE: Shopify Scripts for discounting is only compatible with Shopify Plus and available to merchants who were previously granted access to the Script Editor app in Shopify Admin. Shopify has since removed the Script Editor app from the Shopify App Store for new merchants.
Because Shopify Scripts will be deprecated by Shopify in August 2025, it is highly recommended to migrate over to using Rebuy's discounting feature using Shopify Functions.
For more information on how to use Rebuy's integration with Shopify Functions for discounting, please refer to our Rebuy Discount Overview guide linked below.
Shopify Scripts is not a Rebuy product, and unfortunately, Rebuy Support is unable to create, modify, or customize Scripts to align with your specific needs.
We recommend using our guides as a helpful reference for any Script customizations you'd like to implement. If you encounter challenges with your custom scripts, we suggest reaching out to Shopify support for assistance. For additional details on our support scope, please consult our policy page. Your understanding is greatly appreciated.
Note:
Please use https://jgodson.github.io/shopify-script-creator/ to follow along.
If you are not on Shopify Plus then you must create duplicate products with unique prices and common SKUs in order to create discounted upsells. You would then use a Rebuy Data Source to surface these duplicate (discounted) products via your widget.
Does not work with Recharge-related widgets.
Widget Set Up:
Create a widget and make it display reduced pricing:
Script Creator:
Navigate to https://jgodson.github.io/shopify-script-creator/ and click "Create new" and then "Conditional Discount":
Make sure that the "Discounted Item Selector" is set to "Has Properties":
In the keys and values section, add "_widget_id" as the key and the ID of the widget you would like to discount as the value:
Customize your discount to apply, in this example ours would be a fixed percentage of 20 percent:
Click Save and Generate Script:
Copy this to your clipboard and then navigate to the Script Editor App in Shopify:
Create a new Blank Template Script and paste in the Script you just copied, and be sure to preview it in your store to test it out:
Test out your widget and see if the discount was applied:
Congratulations! You've successfully created a Shopify Discounting Script with no coding required.
More Examples:
Fixed Item Discount (This will also only apply the discount to one item):
Customer Email/Tag:
Customer Order Count (returning customers):
Cart Subtotal/Item count:
Shipping Address:
Advanced:
You can do all sorts of campaigns with the script creator. The set up would be very similar to the examples listed above.
Popular campaign types:
Conditional Discounts
Tiered Discounts
Buy X Get X (BOGO)
Important Note:
As long as the "Discountable Items Selector" is set to "Has Properties" and the key is "_widget_id" and the value is the ID of your widget, you have full control of customization with these scripts.