How can I add a legal age confirmation checkbox to my Buy Button's cart drawer?

Topic summary

A user is integrating a Shopify Buy Button into their Squarespace website for an alcohol e-commerce store and needs to add a legal age confirmation checkbox to the cart drawer.

Attempted Solution:

  • Tried adding custom code to the Shopify Buy Button embed script on Squarespace
  • Used a customCheckbox configuration with text “I confirm that I am legal to buy alcohol” and required: true

Current Status:

  • The attempted code modification did not work
  • No solution has been found yet
  • The discussion remains open with no responses or resolution
Summarized with AI on November 14. AI used: claude-sonnet-4-5-20250929.

I have a website on squarespace, in which Shopify buy button is integrated. When I add items to the cart, it opens the cart drawer, I would like add a checkbox text ‘I am legal age to buy alcohol’, but I don’t find any solution to add it on the cart drawer.

I tried to add this code on squarespace in embed script that was provided by Shopify buy button, but it did not work.

          "customCheckbox": {
            "text": "I confirm that I am legal to buy alcohol",
            "required": true
          },