Publish/Unpublish Product on a Given Day of the Week

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
1 year ago
Working with:
  - no-source nopCommerce 4.50.1
  - restaurant ordering

Restaurants often have specials that are available only on a specific day of the week, like Taco Tuesday.

Looking for:
[1] Ideas that would do this with no-source
[2] Possible solutions to an idea I have

On [2]:
After creating a single simple product with all of the sale items in attributes, I would need a way to automatically publish and unpublish the product depending on the day of the week. Anyone know if there a way to do this in no-source or with an available plugin?

If all else fails, I've already implemented a button in the Admin area to open and close the restaurant for online ordering and I can add this as well but, if possible, I'd rather not rely on a human being clicking a button to make this work.
1 year ago
There is no plugin for this feature that I'm aware of.  
You could do it with SQL.  You could create a schedule using SQL Server Agent jobs in SQL Server, or create a .sql script / sqlcmd Utility, and call it in a Windows Scheduled task.
1 year ago
That's a great idea, I'll talk to the boss about it. Thanks!

Another possibility I thought of, but is less reliable, is to only allow access to that page from the homepage with a banner that only appears on the given day. However, since users could just enter the URL to the page, I would add JQuery to bump out of the page if someone does that and it isn't that day.
1 year ago
Not having any "access to that page" means the customers may not even know such a special exists (until the day of).
1 year ago
Agreed. I was thinking about some perverse person bookmarking it on the given day and then going to it on other days, intentionally or unintentionally, trying to get a better deal on other days. However, I just realized that I've already removed "Add to Cart" on days other than the given days, so that would not work.

I could do it either way, either (1) with SQL and a task scheduler (which could be set up to show the item in the Menu Category when available); or, (2) with the product in no category and accessible only by hyperlink (never shows up in the Menu Category). I could also (3) create a Specials Category and put it there, with "Add to Cart" only available on the special day(s).

Need to kick this all by the boss. Thanks again for you input!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.