All things Shopify and commerce
Hi There, i am making a store for my client where his requirement is to sell food on weekly basis so there are 4 menus for 4 weeks so i created a weekly menu page and showing four products Week1, Week2, Week3 & Week4 now problem is my client wants to enable "Add to cart" button only for running week and for rest 3 weeks "Add to cart" should be disabled so buyer can see all 4 weeks menu but can add to cart only the available one for example if the date is 9th of october means add to cart button is disabled for week1, week3 and week4 but enabled for week2 .. how can i do this? please tell me the way or app or whatever is possible .. thank you
Hi @mughal,
This seems to be custom development task.
Let me know if you want to hire me
Regards
Reena
To enable the 'Add to Cart' feature only for the current week's menu, follow these steps to ensure that your website or app restricts purchases to the items available for the specific week:
To enable the 'Add to Cart' feature only for the current week's menu, follow these steps to ensure that your website or app restricts purchases to the items available for the specific week:
You can achieve this using a custom code snippet or a Shopify/WooCommerce plugin that enables date-based product availability. Set conditions to check the current date and enable the "Add to Cart" button only for the running week's menu while keeping others disabled.
For Shopify, apps like "Advanced Product Options" or "Dynamic Product Restrictions" can help.
For WooCommerce, use "WooCommerce Product Restrictions" or add a custom PHP function to disable the button based on the date.
This way, customers can browse all weekly menus but order only the active one—just like a fresh meal that’s available only at the right time!
Hey @mughal — great question, and I’ve run into a similar scenario while managing a local food ordering site inspired by the Cook Out Menu (where they rotate trays weekly).
Here’s one way you can do it if you’re using Shopify or WooCommerce:
You can use Shopify’s Liquid code to compare the current date with a custom metafield or tag you've set for each week’s product. Example:
You can dynamically assign current_week using date logic or apps like Mechanic or Shopify Flow (for Plus users).
Use a simple PHP snippet in your theme's functions.php:
Just tag each product with the correct week and update $current_week based on the date.
Let your client know it’s kind of like running a rotating Cookout Tray special — the customer can see all the delicious options in the menu, but only order what’s on deck for the current week. 😄
Let me know what platform you’re using and I can share more targeted steps!
Hey, I actually had the same issue on my own food menu site where I needed to show different weekly menus but only allow purchases for the current week. Since you're using Shopify, here's a way you can handle it:
You can add a custom metafield to each product to represent its assigned week (for example, week number like 41, 42, etc.). Then in your theme’s product or collection template, use Liquid code to compare the current week number with the product’s week number.
Here’s a simple example of how the logic works:
This checks if the product is part of the current week and shows or disables the button accordingly. You’ll just need to make sure each product has the correct week_number metafield set.
If you're not comfortable editing the code, you could also use an app like Advanced Product Options by HulkApps or Mechanic to set up rules for availability based on the current date or week.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025