scripts
The active scripts, of each script type, on the store.
Caution
Shopify Scripts will be sunset on August 28, 2025. Migrate your existing scripts to Shopify Functions before this date.
There can be only one active script of each type. Currently, the only type accessible in Liquid is
.
Tip
To learn more about Shopify Scripts and the Script Editor, visit the Shopify Help Center.
Properties
The active line item script.
If no line item script is currently active, then
nil
is 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 %}{% if scripts.cart_calculate_line_items %} <p>Don't miss our current sale: <strong>{{ scripts.cart_calculate_line_items.name }}</strong></p> {% endif %}
{ "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>
{
"cart_calculate_line_items": {}
}
{
"cart_calculate_line_items": {}
}
Was this section helpful?