Prevent Orders Without Bookings
Last reviewed: 2026-08-05
On this page
If the Shopify Add to Cart button is visible while the booking widget is loading, a customer may be able to purchase an event product without selecting a time. You can reduce that risk by adding an Accept Bookings product metafield and using it in your theme's buy-buttons code.
This solution requires editing Shopify theme code. If you are not comfortable editing Liquid, ask a developer or contact support for guidance. Always duplicate your theme before changing code.
Step 1: Create the Accept Bookings metafield
- In Shopify Admin, go to Settings > Custom data > Products (or Settings > Metafield definitions > Products).
- Click Add definition.
- Set the name to Accept Bookings.
- Confirm the namespace and key are
custom.accept_bookings. - Set the type to True or false.
- Click Save.
Step 2: Assign the metafield to products
- Go to Products in Shopify Admin.
- Open the product that requires a booking.
- Scroll to the Metafields section.
- Set Accept Bookings to True for products that require a booking.
- Leave it False for products that customers can purchase normally.
- Save the product.
Step 3: Update the theme's buy-buttons code
- Go to Online Store > Themes.
- Open the theme's action menu and choose Edit code.
- Find the
buy-buttons.liquidfile in Sections or Snippets. Theme versions use different file names, so ask a developer if you cannot find the file that renders your product buttons. - Add a condition around the Add to Cart button so it is disabled or hidden while the booking widget has not finished loading when
product.metafields.custom.accept_bookingsis true. - Save the file and test a booking product in a duplicate or unpublished theme first.
The exact Liquid varies by theme. The goal is to prevent the standard Add to Cart action for products marked Accept Bookings until Easy Appointment Booking replaces it with Select a Time.
This is a theme-level safeguard, not a replacement for configuring the Easy Appointment Booking app embed. If the booking button never appears, first follow The "Select a Time" button and confirm the app extension is enabled.
Test the result
- Open the product page in a private browser window.
- Refresh the page and watch the button while the widget loads.
- Confirm the customer cannot add the booking product to the cart without selecting a time.
- Select a time and confirm the booking line item can still be added normally.
- Test a product whose metafield is False to make sure normal products still use Add to Cart.
Next steps
- The "Select a Time" button — enable and troubleshoot the booking button
- Getting the calendar to appear — check product, inventory, and theme settings
- Managing and preventing double bookings — reduce other booking conflicts