How to enable 'Add to Cart' only for current week's menu?

How to enable 'Add to Cart' only for current week's menu?

mughal
Visitor
1 0 0

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

Replies 2 (2)

Reena_Soni
Shopify Partner
138 24 31

Hi @mughal,

This seems to be custom development task.

Let me know if you want to hire me

 

Regards

Reena 


Chat on WhatsApp

Need a developer? Hire me at sonireena1031@gmail.com
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications Into Shopify Theme.
If I helped you out, mark it as the solution and drop me a thumbs up! | Shopify Partner | Do not hesitate to contact me via Message.

horacerichmond
Visitor
1 0 0

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:

1. Define the Current Week's Menu

  • Create a separate menu list for each week, ensuring that it dynamically updates based on the current date.
  • Use a scheduling system or content management system (CMS) that automatically populates the menu with the appropriate items when a new week begins.

2. Restrict the 'Add to Cart' Button

  • Hide 'Add to Cart' for Non-Current Items: Implement logic that checks whether the item belongs to the current week's menu before displaying the 'Add to Cart' button. If the item is not part of the current week, hide or disable the button.