Theme blocks: plugins in your online store

ShopPress adds blocks to your theme editor (Online Store → Themes → Customize), under Apps. They work with any Online Store 2.0 theme, such as Dawn and most themes from the Theme Store.

ShopPress plugin content

Shows HTML that a plugin saved. Good for banners, notices and anything that changes only when the plugin runs.

  1. In your plugin: sp.theme.setBlock("free_shipping_bar", html). The gallery's Free shipping bar does this.
  2. Run the plugin once (or let a schedule run it).
  3. In the theme editor: Add block → Apps → ShopPress plugin content, then enter the block key free_shipping_bar.

Settings: block key, alignment, vertical space. ShopPress removes scripts and inline event handlers from the HTML before saving it.

ShopPress live plugin

Runs a plugin tool when the page loads and shows its result. Good for per-product content such as "More from this brand".

  1. Mark the tool public: true. Public tools are read-only: they can read your store but can't change anything.
  2. In the theme editor: Add block → Apps → ShopPress live plugin, then enter the plugin's slug and the tool name.
  3. On product pages the block passes product=<id>, on collection pages collection=<id>. Declare product: "number?" in the tool's input to use it. Extra input adds more, like limit=4.

Results are cached for 60 seconds. A tool can return { html: "…" } (shown as HTML) or any JSON (shown as text).

App embed: use plugins anywhere

Theme settings → App embeds → ShopPress switches on the storefront loader. Any element in your theme, including custom Liquid sections, then fills itself:

<div data-shoppress-url="/apps/shoppress/run/more_from_this_brand/more_from_brand?product={{ product.id }}"></div>

The embed also has a Custom CSS box for styling ShopPress content.

Storefront address

Public tools are reachable at https://<your store>/apps/shoppress/run/<plugin>/<tool>?<inputs> through Shopify's app proxy. Shopify signs every request, and only public: true tools answer.