Skip to content

πŸš€ Expand automatic coupon insertion to more storesΒ #67

Description

@AminDhouib

Updated 2026-08-15. The original version of this issue (Aug 2025) told contributors to add a store by editing apps/caramel-extension/supported.json and adding stores/<name>.js. Since the WXT migration (v1.4.0, PRs #191–#199) neither exists β€” see the thread below for the details. This issue now describes how store support actually works and how you can help.

How store support works now

Caramel knows coupon codes for thousands of stores, but auto-applying them at checkout needs the extension to know where a store's promo field, apply button, price container, etc. live.

  • The extension's apply engine (apps/caramel-extension/coupon-apply.js) is generic-first: it tries store-agnostic selectors for the coupon input, apply/remove buttons, "applied" state and error text.
  • Where a store needs more, a per-store config (show-input / dismiss / coupon input / apply button / price container / success & error indicators / remove selectors) is served to the extension at runtime from the app's store_configs catalog table.
  • Those configs are produced by our internal coupon pipeline, which discovers a store's selectors, verifies them against the real extension, and publishes them to the catalog. There is no in-repo file to edit for a new store, and no stores/<name>.js code path.

How you can help

  1. Request a store β€” open a πŸͺ Store Request with the store URL and anything odd about its checkout (promo field hidden behind a "Have a code?" link, iframes, blocking modals, cart-only vs checkout-only field). If you've already dug out selectors, include them β€” they're a useful hint even though the pipeline re-derives and re-verifies them.
  2. Report a store where auto-apply misbehaves β€” a bug report with the store, page URL and what the extension did (or use the in-extension "report a problem" link).
  3. Improve the generic engine (code PRs) β€” anything that lets coupon-apply.js succeed on more sites without a per-store config: broader generic input/apply/remove/applied-state selectors, collapsed promo fields, dynamic DOMs (MutationObserver), iframes. Open a PR against apps/caramel-extension with tests under apps/caramel-extension/tests; pnpm lint / prettier must be green. Keep selectors narrow to avoid false positives.
  4. Docs β€” a CONTRIBUTING.md capturing the above (plus dev setup from docs/LOCAL-DEV.md) would be welcome.

Questions welcome here or on our Discord.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions