How Valotrix Cart Rewards works
In one sentence: you create a campaign, the app watches every shopper's cart, and when the cart matches your rule the app adds the gift line and applies the discount at checkout.
That's it. No theme edits, no copy-paste snippets, no manual setup per product.
The shopper's journey
- You create a campaign in the Valotrix Cart Rewards admin (sidebar → Campaigns → Create campaign). It defines a trigger (one or more conditions like "cart subtotal at or above $50") and a reward (one or more gifts).
- Valotrix Cart Rewards saves the rule to your store. The change syncs within seconds - no theme edits, no copy-paste required.
- A shopper visits your store and adds products to their cart. Valotrix Cart Rewards watches every cart change.
- The rule matches (e.g. the cart subtotal crosses $50). Valotrix Cart Rewards adds the gift line to the cart automatically.
- The shopper proceeds to checkout. The gift line shows as -$X.XX with a 100%-off discount applied (configurable per rule - 100% by default for true free gifts). Other lines in the cart are untouched.
- If the shopper removes the trigger product (or otherwise stops matching the rule), Valotrix Cart Rewards removes the gift line automatically. They never pay for a gift they no longer qualify for.
- The order completes. Valotrix Cart Rewards records the conversion in Analytics so you can see what's working.
Why not a "$0 variant" hack?
Older free-gift apps create a hidden $0 variant of your gift product, then add that variant to the cart. This works but has three problems:
- It clutters your catalog with stand-in variants.
- It confuses inventory management (the $0 variant has its own stock count).
- Shop Pay express checkout doesn't always handle hidden variants gracefully.
Valotrix Cart Rewards avoids all of that. The gift line uses the real variant of your gift product, and the discount is applied at checkout by Shopify's own discount system. Your catalog stays clean, your inventory tracks the real product, and express checkout works as Shopify intended.
How it works under the hood (for developers)
The merchant flow above is powered by three moving parts:
- A storefront script (runs on every page of your store, embedded via Shopify's App Embed system). Watches
cart.jsmutations, re-evaluates rules client-side, and POSTs cart updates to add or remove gift lines. - A discount Function - a small program Shopify runs at checkout via Shopify Functions for Discounts. It targets only the gift lines Valotrix Cart Rewards added (matched by
_vltrx_*line properties) and applies the configured percentage discount. 100% by default. - The admin app (where you configure campaigns). Saves rules to the database and syncs an Automatic Discount entry to Shopify so the Function knows which campaigns are active.
There's also a Cart Transform Function that ships with every install. It rewrites the gift line's title to read "FREE GIFT" (or whatever you've configured). Cart Transform is a Shopify Plus surface: on non-Plus stores the function silently no-ops; on Plus stores the title rewrite renders at checkout. The presentation-only behavior is documented separately in Plus features.