Shop discount script
Website rewriteResets at 5:19 PM
Shop discount script
Website rewriteSearch chats or run a command
Write a short script for the online shop: 10% off a subscription’s first box with the code FIRSTBOX.
Wrote the document
{ "documentId": "first-box-discount", "kind": "code", "title": "First box discount"}{ "documentId": "first-box-discount", "kind": "code", "title": "First box discount", "version": 1}The script checks the code at checkout, takes 10% off the first box only, and leaves later boxes at full price. It refuses the code on a one-off order.
Refuse the code if the customer has used it before.
Changed the document
{ "documentId": "first-box-discount", "kind": "code", "title": "First box discount"}{ "documentId": "first-box-discount", "kind": "code", "title": "First box discount", "version": 2}It now checks the codes the customer has used, and refuses FIRSTBOX on a second subscription.
Orion can make mistakes. Check what matters.