Subscribe

Add a tested shipping rule to your e-commerce app

When you add or change a rule, Lovable writes and runs tests automatically to verify it works

When to use it

Your online bakery needs to offer free shipping for orders over $50 to boost average order value

Why it is worth it

Automated tests catch rule errors before customers encounter them, reducing bugs and support tickets

The prompt

For an online bakery selling breads and pastries, add a shipping rule: orders of $50 or more get free shipping, orders under $50 pay $7.99. On the checkout page, show the current shipping cost and how much more customers need to spend for free shipping. Write tests to check: 1) a $45 order shows $7.99 shipping, 2) a $50 order shows free shipping, 3) a $75 order shows free shipping. Run all tests and confirm they pass before you finish.

Swap the bakery with your app and change the dollar amounts to match your shipping rules

What you get

A new shipping rule in your app with automated tests confirming it works for different order totals

From docs.lovable.dev/changelog#lovable-writes-and-runs-tests-for-the-rules-you-change

More build tips

All tips

Get the Loop every week.

New Lovable features and the prompts to use them, in one short email. Free, and you can leave any time.

Prompt copied