A user is attempting to modify their Dawn theme (version 15.3.0) to block ordering from specific collections during a festive period (December 9, 2025 to March 3, 2026). They received code from ChatGPT that should replace the submit button line in main-product.liquid, but are unable to locate the correct code section to edit.
The proposed solution includes:
Date-based blocking logic using Liquid template variables
A list of blocked collection handles (vegan cakes, cupcakes, gluten-free items, etc.)
A disabled button with a message: “Regular orders closed till 3/3/26 ” and “Regular orders reopening 3rd March 2026”
Custom styling for the disabled state
Current status: The discussion remains open with no responses yet. The user is seeking help locating where to implement this code or alternative approaches to achieve collection-specific ordering restrictions during specified dates.
Summarized with AI on November 3.
AI used: claude-sonnet-4-5-20250929.
Hi!
I’m trying to edit my Dawn theme (15.3.0) code to allow me to block out ordering of certain collections during my festive period dates. I’ve tried going to chatgpt for advise but am stuck because I can’t find the code to edit.
Any help or advise / alternatives would be greatly appreciated please!
Thank you!
I’m supposed to replace the {{ form | submit_button: ... }} line in the main-product.liquid section.
{% comment %}
Block ordering for these collections during the specified period.
Handles are the lowercase, hyphenated versions of your collection names.
{% endcomment %}
{% assign blocked_collections =
“vegan-vegetarian-cakes,vegan-vegetarian-and-or-gluten-free-cupcakes,cakes,cupcakes-mini-cupcakes,gluten-free-some-options-of-vegan,vegan-glutenfree-cookies,cookies,loving-mum”
| split: “,” %}
{% assign block_this_product = false %}
{% for c in product.collections %}
{% if blocked_collections contains c.handle %}
{% assign block_this_product = true %}
{% endif %}
{% endfor %}
{% if current_date > start_block and current_date < end_block and block_this_product %}
⚠️ Regular orders closed till 3/3/26
Regular orders reopening 3rd March 2026
{% else %}
{{ form | submit_button: 'Add to cart', class: 'product-form__submit button button--full-width button--primary' }}
{% endif %}
Perfect — you’re very close!
Let me guide you step-by-step so you can safely add this “block ordering for certain collections during festive dates” feature to your Dawn 15.3.0 theme.
Step-by-Step Setup
Open the correct file
In your Shopify admin:
Go to Online Store → Themes → Dawn (15.3.0) → Edit code
Open the file:
sections/main-product.liquid
Scroll down until you find this line (around line 450–550 typically):
{{ form | submit_button: 'Add to cart', class: 'product-form__submit button button--full-width button--primary' }}
That’s the button you’ll replace.
Replace that line with the following code
Use this cleaned, correct version (your version had curly quotes “ ” instead of straight quotes " " — Liquid will break if you use curly quotes).
{% assign current_date = 'now' | date: "%s" %}
{% assign start_block = '2025-12-09 00:00:00' | date: "%s" %}
{% assign end_block = '2026-03-03 00:00:00' | date: "%s" %}
{% comment %}
Block ordering for these collections during the specified period.
Handles are the lowercase, hyphenated versions of your collection names.
{% endcomment %}
{% assign blocked_collections = "vegan-vegetarian-cakes,vegan-vegetarian-and-or-gluten-free-cupcakes,cakes,cupcakes-mini-cupcakes,gluten-free-some-options-of-vegan,vegan-glutenfree-cookies,cookies,loving-mum" | split: "," %}
{% assign block_this_product = false %}
{% for c in product.collections %}
{% if blocked_collections contains c.handle %}
{% assign block_this_product = true %}
{% endif %}
{% endfor %}
{% if current_date > start_block and current_date < end_block and block_this_product %}
<div class="product-form__blocked" style="color:#b30000; font-weight:600; margin-top:1rem;">
⚠️ Regular orders closed till <strong>3 March 2026</strong><br>
Regular orders will reopen on <strong>3rd March 2026</strong>.
</div>
{% else %}
{{ form | submit_button: 'Add to cart', class: 'product-form__submit button button--full-width button--primary' }}
{% endif %}
Further Edit your post to put the code in a full code block, or inside a summary element(click the options circle-button-with-plus-sign on the end of the formatting bar in the post editor)
DON’T POST GIANT WALLS OF TEXT, either find small relevant parts or put in the effort to format properly.
Avoid posting the entirety of a themes code, some code you are not allow to share, dawn is free so is okay but it’s a nasty & dangerous habit to have if you ever get a premium theme.
Respect others time , would you make your grandma scroll through all that noise?
Why would you do it to a stranger you want to help YOU.
It’s the type of thing that encourages MORE bot posts and for actual experts to learn to ignore you when you have a serious problem.