metatroncubeswdev 365e45406a Bundle Offers Shopify app: discount function, admin, storefront, deploy stack
Rust discount function (one automatic discount evaluating all offers in priority
order, parity with the Odoo engine), React Router admin with Polaris, theme app
extension and app proxy pages, webhooks incl. GDPR, managed-pricing limits, and
a Docker Compose stack (Postgres + Caddy HTTPS) for a single VPS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 21:35:58 -04:00

37 lines
1.2 KiB
Plaintext

{%- comment -%}
App embed (§12): loads the CSS/JS once on every page, exposes the running offers to bundle-offers.js
(window.BundleOffers), applies the design tokens, refreshes cart hints after cart changes and drives
"Add bundle to cart" on the bundle pages served by the app proxy.
{%- endcomment -%}
{%- assign data = app.metafields.bundle_offers.storefront.value -%}
{%- if data -%}
<script type="application/json" id="bundle-offers-data">
{
"after": {{ data.after | json }},
"currency": {{ shop.currency | json }},
"moneyFormat": {{ shop.money_format | json }},
"strings": {
"adding": {{ 'bundle_offers.embed.adding' | t | json }},
"added": {{ 'bundle_offers.embed.added' | t | json }},
"error": {{ 'bundle_offers.embed.error' | t | json }}
}
}
</script>
<style>
:root {
{%- if data.accent != blank %}--bo-accent: {{ data.accent }};{% endif %}
--bo-radius: {{ data.radius | default: 8 }}px;
}
</style>
{%- endif -%}
{% schema %}
{
"name": "Bundle Offers",
"target": "body",
"javascript": "bundle-offers.js",
"stylesheet": "bundle-offers.css",
"settings": []
}
{% endschema %}