Some checks failed
CI / Lint, Unit & Integration Tests (push) Has been cancelled
Many themes only expose "Add section" for the cart's checkout area, not "Add block" next to the actual Checkout button — Shopify gives apps no supported way to inject a block into an arbitrary spot in a theme's own section markup, so a manually-placed app block can only ever land as a disconnected standalone section on those themes. Add a JS-based fallback via the app embed (already loaded site-wide, independent of block placement): app-embed.liquid now carries the same config settings as the block plus an "auto-place on cart page" toggle (default on), emitted as an inert <template> with the widget's config as data-* attributes. datetime-widget.ts's maybeAutoPlaceOnCart() finds the theme's own Checkout button by CSS selector (a few common patterns, most specific first) and inserts a live widget immediately before it — skipped entirely if a block-placed widget already exists on the page, or no Checkout button can be found by any known selector. Also fix shopify.app.toml: automatically_update_urls_on_dev was left on after the app got a real, permanent production domain (metatron-delivery.thedomainnest.com) — leaving it on meant a future local `shopify app dev` session would silently overwrite the live app's application_url with a temporary Cloudflare tunnel, breaking the deployed app until someone noticed and redeployed with the real URL. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
127 lines
5.8 KiB
TOML
127 lines
5.8 KiB
TOML
# Learn more about configuring your app at https://shopify.dev/docs/apps/tools/cli/configuration
|
|
|
|
client_id = "fd503f515942a32aa8b811c1ab8c89d0"
|
|
name = "Metatron-delivery"
|
|
# The app's real, permanent production URL — PM2 (ecosystem.config.cjs)
|
|
# keeps the Remix server running here on the actual deployment server, per
|
|
# .env's SHOPIFY_APP_URL/PORT on that machine. NOT a placeholder anymore:
|
|
# automatically_update_urls_on_dev is deliberately OFF (see [build] below)
|
|
# specifically so a local `shopify app dev` session never overwrites this
|
|
# with a temporary Cloudflare tunnel URL and breaks the live app for real
|
|
# usage. Only change this value (and redeploy) if the production domain
|
|
# itself changes.
|
|
application_url = "https://metatron-delivery.thedomainnest.com"
|
|
embedded = true
|
|
|
|
[access_scopes]
|
|
# Learn more at https://shopify.dev/docs/apps/tools/cli/configuration#access_scopes
|
|
# read_customers deliberately omitted: no feature currently calls the
|
|
# Customers API (Booking.customerEmail/customerPhone come straight off the
|
|
# orders/create webhook payload, covered by read_orders) — requesting it
|
|
# unused would also gate this app behind Shopify's Protected Customer Data
|
|
# Access approval for no reason. Add it back only when a feature (e.g. the
|
|
# "recognize returning customers" parity item) actually needs it, and
|
|
# expect to need that approval granted at that point.
|
|
scopes = "read_locales,read_locations,read_markets,read_metaobjects,read_orders,read_products,write_cart_transforms,write_delivery_customizations,write_metaobjects,write_orders,write_payment_customizations"
|
|
|
|
[auth]
|
|
redirect_urls = [ "https://metatron-delivery.thedomainnest.com/auth/callback" ]
|
|
[webhooks]
|
|
api_version = "2025-01"
|
|
|
|
# Handled by: app/routes/webhooks.app.uninstalled.tsx
|
|
[[webhooks.subscriptions]]
|
|
uri = "/webhooks/app/uninstalled"
|
|
topics = ["app/uninstalled"]
|
|
|
|
# Handled by: app/routes/webhooks.app.scopes_update.tsx
|
|
[[webhooks.subscriptions]]
|
|
uri = "/webhooks/app/scopes_update"
|
|
topics = ["app/scopes_update"]
|
|
|
|
# Handled by: app/routes/webhooks.orders.create.tsx
|
|
[[webhooks.subscriptions]]
|
|
uri = "/webhooks/orders/create"
|
|
topics = ["orders/create"]
|
|
|
|
# Handled by: app/routes/webhooks.orders.updated.tsx
|
|
[[webhooks.subscriptions]]
|
|
uri = "/webhooks/orders/updated"
|
|
topics = ["orders/updated"]
|
|
|
|
# Handled by: app/routes/webhooks.orders.cancelled.tsx
|
|
[[webhooks.subscriptions]]
|
|
uri = "/webhooks/orders/cancelled"
|
|
topics = ["orders/cancelled"]
|
|
|
|
# Handled by: app/routes/webhooks.app_subscriptions.update.tsx — keeps
|
|
# Shop.tier in sync with the merchant's actual billing state, including
|
|
# cancellations made from Shopify's own billing page (not just via
|
|
# /app/billing in this app).
|
|
[[webhooks.subscriptions]]
|
|
uri = "/webhooks/app_subscriptions/update"
|
|
topics = ["app_subscriptions/update"]
|
|
|
|
# Mandatory GDPR compliance topics — required for Built-for-Shopify /
|
|
# public app review. TEMPORARILY DISABLED: `shopify app dev`/`deploy`
|
|
# refuses to push these until the org has requested and been granted
|
|
# "Protected customer data access" in the Partner Dashboard (Apps ->
|
|
# this app -> API access -> Protected customer data) — that's a manual
|
|
# questionnaire/approval step, not something the CLI or config can
|
|
# bypass. RE-ENABLE these three blocks (handlers already exist and are
|
|
# wired: app/routes/webhooks.customers.data_request.tsx,
|
|
# webhooks.customers.redact.tsx, webhooks.shop.redact.tsx) once that
|
|
# access is granted, and before any public launch/BfS submission.
|
|
|
|
# [[webhooks.subscriptions]]
|
|
# uri = "/webhooks/customers/data_request"
|
|
# compliance_topics = ["customers/data_request"]
|
|
|
|
# [[webhooks.subscriptions]]
|
|
# uri = "/webhooks/customers/redact"
|
|
# compliance_topics = ["customers/redact"]
|
|
|
|
# [[webhooks.subscriptions]]
|
|
# uri = "/webhooks/shop/redact"
|
|
# compliance_topics = ["shop/redact"]
|
|
|
|
# This org appears enrolled in Shopify's "Next Generation Events" developer
|
|
# preview (https://shopify.dev/changelog/next-generation-events-now-available-in-developer-preview),
|
|
# a separate, optional delivery mechanism from classic [webhooks] above
|
|
# (GraphQL-style resource topics + create/update/delete actions, api_version
|
|
# pinned to "unstable" while in preview). The CLI now treats [events] as a
|
|
# REQUIRED section for this app/org even though our app doesn't use it —
|
|
# everything real is handled via [webhooks]. This subscription is a
|
|
# functionally-inert placeholder that exists solely to satisfy that schema
|
|
# gate (app/routes/webhooks.events.placeholder.tsx just logs and returns
|
|
# 200) — it is not part of this app's actual feature set.
|
|
[events]
|
|
api_version = "unstable"
|
|
|
|
[[events.subscription]]
|
|
handle = "unused-events-preview-placeholder"
|
|
topic = "Product"
|
|
actions = ["create"]
|
|
uri = "/webhooks/events/placeholder"
|
|
|
|
# App proxy so the storefront Theme App Extension can call our backend
|
|
# without CORS issues (see IMPLEMENTATION_PLAN.md §5.3). Points at the real
|
|
# production domain — the Remix routes it forwards to (apps.scheduling.*.tsx)
|
|
# assume the exact /apps/scheduling prefix below.
|
|
[app_proxy]
|
|
url = "https://metatron-delivery.thedomainnest.com/apps/scheduling"
|
|
subpath = "scheduling"
|
|
prefix = "apps"
|
|
|
|
[build]
|
|
# Deliberately OFF now that there's a real, permanent production URL above
|
|
# — if this were true, running `shopify app dev` locally (e.g. to test a
|
|
# theme/UI extension change) would silently overwrite application_url on
|
|
# Shopify's live app record with a temporary Cloudflare tunnel, breaking
|
|
# the deployed app for anyone using it until someone notices and redeploys
|
|
# with the real URL. Local `shopify app dev` sessions still work fine for
|
|
# testing extensions with this off; the embedded admin app just won't be
|
|
# reachable through that session's tunnel (test it against the real
|
|
# production domain above instead).
|
|
automatically_update_urls_on_dev = false
|