Add the theme blocks
What does this do for me?
The Customer Gate theme extension ships two blocks: the Customer Gate form (application-form) block that renders the application, and the Customer Gate message (access-gate) block that shows access messaging beside a denied experience.
Before you begin
These blocks are section app blocks. They work on Online Store 2.0 themes that use JSON templates, such as Dawn. Vintage themes that use Liquid templates do not support them, so upgrade to an Online Store 2.0 theme to host storefront blocks. Checkout enforcement continues separately at checkout.1. Open the theme editor
Open Settings, then the Theme app extension onboarding section. The app builds deep links to the theme editor once your shop domain is known. Links open your current published theme at Online Store > Themes. To configure or preview on an unpublished draft theme, use Online Store > Themes in Shopify admin.2. Add the Customer Gate form block
Theapplication-form block renders a published form on a page template:
- In the theme editor, add the Customer Gate form block to a page or index template.
- Set the Form slug to the slug of a published form.
- Paste the one-time Form key from Settings so storefront submissions authenticate.
- Keep the default Proxy path (
/apps/customer-gate) unless the store customized its app proxy path. - Optionally set a Document type for applicant attachments. The default is
resale_certificate.
3. Add the Customer Gate message block
Theaccess-gate block shows messaging to unapproved customers on storefront, product, or collection templates:
- In the theme editor, add the Customer Gate message block to the templates you gate.
- Set the Surface to
storefront,product, orcollection. - Edit the Denied message shown to unapproved customers.
- Optionally set an Access URL and Access label (the button text for the application form link).
- Optionally set a Support URL and Support label (the button text for the support link).
- Optionally set a Protected selector, a CSS selector to hide from the page when access is denied.