Configuration
A rule
| Field | What it does |
|---|---|
| Name / Handle | How the rule is known in the CP and on the command line. The handle is unique per store |
| What this rule does | Offer a free shipping method, Waive the cost of the chosen method, or Block free shipping |
| Customer-facing name | What the customer sees at checkout. Blank falls back to the Default method label setting |
| Hide other shipping methods | Method rules only — see Usage |
| Methods to waive | Waiver rules only. Nothing selected means "whichever method they chose" |
| Description | Written onto the order's shipping adjustment, so whoever reads the order later knows why |
| Order conditions / Customer conditions | All must pass — see below |
| Sites | Nothing selected means every site |
| Start date / End date | A campaign window, inclusive of both ends |
A rule's position in the list is its precedence. Drag to reorder.
Conditions
Every order condition Commerce already offers is available — Item Subtotal, Discounted Item Subtotal, Total Qty, Total Weight, coupon code, purchasable, shipping zone and the rest — except the ones that only have an answer after checkout. A cart is never completed, paid, or in an order status, so those are left out rather than offered as conditions that can never pass.
Free Ride adds its own:
| Condition | Asks |
|---|---|
| Shipping Postal Code | is one of / is not one of a list like 28105, 282*, 10000-19999 |
| Shipping Country | the shipping address's country, without modelling a zone first |
| Shipping State / Province | a plain list — NC, SC, GA — codes or names, case-insensitive |
| Cart Product Types | includes any of / includes only / includes none of |
| Cart Contains Something Related To | whether anything in the cart is related to the elements you pick — a category, a collection entry |
| Largest Item Dimension | the longest single length, width or height of any line item |
| Distinct Items | line items, not quantity — three of one thing is one |
| Day of Week | evaluated now, in the system timezone |
| Time of Day | is between / is not between two times like 22:00 and 02:00; windows wrap midnight |
Postal code lists
Separate codes with commas, semicolons or new lines. Spaces inside a code are ignored, so
SW1A 1AA and sw1a1aa are the same code.
28105— exact282*— anything starting28210000-19999— a numeric range, inclusive. A US ZIP+4 like10001-1234is compared on its first five digits.
Customer conditions
User groups, and anything else Craft's user condition builder knows. Any customer condition means a guest order can never match — there is no user to ask.
Settings
Settings → Plugins → Free Ride, or Free Ride → Settings for admins.
| Setting | Default | Why you would change it |
|---|---|---|
| Default method label | Free Shipping | What a free method is called when its rule has no customer-facing name |
| Amount remaining message | Spend {remaining} more for free shipping | {remaining} becomes the formatted amount, in the order's currency |
| Quantity remaining message | Add {remaining} more item(s) for free shipping | Used when the nearest threshold is Total Qty |
| Weight remaining message | Add {remaining} more for free shipping | Used when the nearest threshold is Total Weight |
| Qualifying message | Your order qualifies for free shipping. | Shown once the cart has it |
| Use estimated addresses | on | Off means address conditions wait for a real shipping address |
| Log decisions | off | On while setting rules up; noisy afterwards |
{remaining} is a plain substitution, not Twig — nothing a store editor types into a message is
ever rendered as a template.
Permissions
- Manage free shipping rules — the Rules screen
- Use the simulator — the Simulator screen
Settings are admin-only and follow allowAdminChanges.
Moving rules between environments
Rules are stored in the database, like Commerce's own shipping methods, so they don't travel with project config. Export and import them instead:
php craft freeride/rules/export --store=us --file=rules.json
php craft freeride/rules/import --store=us --file=rules.json
Import matches on handle within the store: an existing rule is updated in place, a new handle is created. Running the same file twice is safe. Import never deletes a rule that isn't in the file.
Two things are environment-specific, so check them after an import: Sites are stored as site IDs, and conditions that point at elements (a product type, a related category) reference them as that environment saved them. If IDs differ between environments, re-pick those in the CP.