Mechanic Get Mechanic

Shopify Function · Cart and checkout validation

Require a gift message at checkout for gift-wrapped items

Stop checkout when a shopper requests gift wrapping but leaves the message blank. Let the order through once there is a note for the recipient.

How the rule works

  1. When
    A cart contains an item marked as gift-wrapped and the gift message is blank.
    Then
    Ask the shopper to enter a gift message before they can check out.

What shoppers see

Message missing
Checkout pauses with the message “Add a gift message for your gift-wrapped order.”
Message added
The shopper can continue through checkout.

Set it up in your shop

Choose the line property your storefront uses to mark an item as gift-wrapped. Then choose the cart attribute where it saves the message. Test a wrapped item with and without a message.

Using the Mechanic gift message form?

Open the saved form and choose Copy form ID. In the rule’s cart attribute condition, enter mechanic_form_YOUR-FORM-ID_gift_message, replacing YOUR-FORM-ID with that ID. The form collects the message. Your storefront supplies the gift-wrap property.

Open the rule as a draft in Mechanic. Test it with your products before publishing.

Customize this Function in Mechanic