Shopify Timed Cart Restriction

Customer: AI | Published: 04.11.2025

I need a short piece of theme-level code (Liquid plus a dash of JavaScript if required) that automatically prevents shoppers from adding any item from my store to the cart between 9 Dec 2025 and 14 Feb 2026—except items that belong to the “Chinese New Year Cookies” collection, which must remain fully purchasable at all times. Key points • Start date: 9 December 2025 • End date: 14 February 2026 • Block add-to-cart on every collection other than Chinese New Year Cookies • After 14 Feb 2026 the restriction should lift itself without me editing the theme again I’d like the solution delivered as: 1. A clearly commented snippet (or Script/Flow if you choose that route) that I can drop straight into the live theme. 2. A brief note that explains exactly where to paste the code and how you reference the exempt collection handle so I can reuse the pattern next year. 3. Simple test steps I can run to confirm the lockout is active and then automatically inactive once the end date passes (you can simulate this with a temporary earlier date in a development copy of the theme). Please stick to native Shopify tools—Liquid, cart.js, or Shopify Functions/Scripts—so I don’t need external apps or subscriptions. If you prefer Shopify Flow plus a small theme tweak, that’s fine too as long as the outcome meets the bullet points above. I am using Dawn Theme (15.3.0)