Mechanic Get Mechanic

Shopify Function · Cart and checkout validation

Require a purchase order number at wholesale checkout

Require a purchase order number from wholesale buyers. Connect the rule to the cart attribute where your storefront collects it.

How the rule works

  1. When
    A buyer tagged “wholesale” has left the cart’s purchase order number blank.
    Then
    Ask for the purchase order number before the buyer can check out.

What shoppers see

Wholesale order missing a number
Checkout pauses with the message “Enter your purchase order number before checking out.”
Wholesale order with a number
The shopper can continue through checkout.

Set it up in your shop

Choose the condition that blocks checkout and write the message buyers will see. Test a blocked cart, then make the change the message asks for.

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

Customize this Function in Mechanic