Menu

Blog — Vedron

A discount code is only useful if it follows the rules you set. A code that is supposed to run for one week and cap at 100 uses should actually run for one week and cap at 100 uses — not forever, and not on orders it was never meant for.

What a discount code needs to check

A valid date window: not live before it starts, not usable after it ends. A usage cap, overall and per customer (100 total uses and one per customer are very different promotions). A minimum order amount where relevant, and a maximum discount cap so a percentage-off code does not produce an unexpectedly large discount on a big cart. And the discount should be calculated on the server at checkout, from real prices, not trusted from the browser.

What runs today in Vedron

Discount codes support percentage and fixed-amount discounts. They can be storefront-wide, per shop, or restricted to specific products — including resolving to child variants automatically rather than only the parent listing.

Validation covers:

The discount is recalculated server-side at the time of redemption.

Common questions

Can a code apply to only some products in my catalog? Yes. Codes can be scoped to specific products, and that scoping resolves to child variants automatically.

What stops a customer using the same code repeatedly? Per-customer limits are checked against real completed orders, not just attempted redemptions.

Is the discount amount trusted from the checkout page? No. It is recalculated server-side from actual prices at redemption.

Talk to us about your setup

Book a short call. Beta clients get two months of custom setup on us.

All posts

Discount codes with the rules you set — expiry, usage caps, product scope

21. Juli 20262 min read
Discount codes with the rules you set — expiry, usage caps, product scope

A discount code is only useful if it follows the rules you set. A code that is supposed to run for one week and cap at 100 uses should actually run for one week and cap at 100 uses — not forever, and not on orders it was never meant for.

What a discount code needs to check

A valid date window: not live before it starts, not usable after it ends. A usage cap, overall and per customer (100 total uses and one per customer are very different promotions). A minimum order amount where relevant, and a maximum discount cap so a percentage-off code does not produce an unexpectedly large discount on a big cart. And the discount should be calculated on the server at checkout, from real prices, not trusted from the browser.

What runs today in Vedron

Discount codes support percentage and fixed-amount discounts. They can be storefront-wide, per shop, or restricted to specific products — including resolving to child variants automatically rather than only the parent listing.

Validation covers:

  • valid-from and valid-until dates
  • overall usage caps
  • per-customer usage caps, checked against completed orders
  • minimum order amount
  • maximum discount cap

The discount is recalculated server-side at the time of redemption.

Common questions

Can a code apply to only some products in my catalog? Yes. Codes can be scoped to specific products, and that scoping resolves to child variants automatically.

What stops a customer using the same code repeatedly? Per-customer limits are checked against real completed orders, not just attempted redemptions.

Is the discount amount trusted from the checkout page? No. It is recalculated server-side from actual prices at redemption.

Talk to us about your setup

Book a short call. Beta clients get two months of custom setup on us.

Did you enjoy this article?