Disable Add to Cart button based on time
Hello!!
I want to prevent a customer from buying a specific item after a certain time of day.
For instance, this site delivers items by 10am. So they don't want anyone purchasing anything after 9am for that days' shopping item.
I have the database constructed in such a way that I can isolate the items that need to be disabled, but I'm trying to figure out how to best disable the button.
I have some code that keeps track of the time, so I can trigger an action based on that, I just need to figure out what action to do. I can disable in the database, but would rather just disable the buy button.
Any ideas?
Thanks!!