scripts
The active scripts, of each script type, on the store.
Shopify Scripts will be sunset on August 28, 2025. Migrate your existing scripts to Shopify Functions before this date.
Shopify Scripts will be sunset on August 28, 2025. Migrate your existing scripts to Shopify Functions before this date.
Caution: Shopify Scripts will be sunset on August 28, 2025. Migrate your existing scripts to <a href="/docs/api/functions">Shopify Functions</a> before this date.
There can be only one active script of each type. Currently, the only type accessible in Liquid is
.
To learn more about Shopify Scripts and the Script Editor, visit the Shopify Help Center.
To learn more about Shopify Scripts and the Script Editor, visit the Shopify Help Center.
Tip: To learn more about Shopify Scripts and the Script Editor, visit the <a href="https://help.shopify.com/manual/checkout-settings/script-editor">Shopify Help Center</a>.
Properties
The active line item script.
If no line item script is currently active, then
nilis returned.ExampleAdvertise the currently active line item script{% if scripts.cart_calculate_line_items %}<p>Don't miss our current sale: <strong>{{ scripts.cart_calculate_line_items.name }}</strong></p>{% endif %}Code
{% if scripts.cart_calculate_line_items %} <p>Don't miss our current sale: <strong>{{ scripts.cart_calculate_line_items.name }}</strong></p> {% endif %}Data
{ "scripts": { "cart_calculate_line_items": { "name": "10% off Whole bloodroot" } } }Output
<p>Don't miss our current sale: <strong>10% off Whole bloodroot</strong></p>Output
<p>Don't miss our current sale: <strong>10% off Whole bloodroot</strong></p>
Example
{
"cart_calculate_line_items": {}
}