learnshopify.dev/Workspace
code reading

Trace how the Brew Rewards block reached the product page.

/* templates/product.json (after installing Brew Rewards) */
{
  "sections": {
    "main": {
      "type": "main-product",
      "blocks": {
        "title": { "type": "title", "settings": {} },
        "price": { "type": "price", "settings": {} },
        "9c81f2ae-4b06-4e6f-9d3a-2f6c1c9e7b41": {
          "type": "shopify://apps/brew-rewards/blocks/points-balance/6a1f0c2d-7e5b-4a9c-8d21-93f4b7a5c018",
          "settings": {
            "heading": "Earn Brew Points on this bag",
            "accent_color": "#b45f3c"
          }
        }
      },
      "block_order": ["title", "price", "9c81f2ae-4b06-4e6f-9d3a-2f6c1c9e7b41"]
    }
  }
}

/* sections/main-product.liquid schema: the two lines that allow it */
"blocks": [
  { "type": "@app" }
]
1. Where does the Liquid behind the `shopify://apps/brew-rewards/...` block live?
2. What does `{ "type": "@app" }` in the section schema allow?
3. Brew Rewards also ships a floating points widget on every page. Which mechanism renders it?
4. Why is this reference model better than apps writing snippets into theme files?
5. A refactor drops `{ "type": "@app" }` from main-product's schema. What breaks?
0 / 1 task solved