Skip to main content

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 cart_calculate_line_items.


Tip

To learn more about Shopify Scripts and the Script Editor, visit the Shopify Help Center.


Properties

Anchor to
cart_calculate_line_items

The active line item script.

If no line item script is currently active, then nil is returned.

Example
Advertise 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 %}

Output

<p>Don't miss our current sale: <strong>10% off Whole bloodroot</strong></p>
{
"cart_calculate_line_items": {}
}
Was this section helpful?