How: Shop only open at opening hours

Phoca Cart - complex e-commerce extension
maintainthedomain
Phoca Member
Phoca Member
Posts: 46
Joined: 21 Sep 2018, 11:34

How: Shop only open at opening hours

Post by maintainthedomain »

Ahoj!

I want my shop working (placing orders) only at opening hours.

I will do it with some JS on client side.

Guess I need a cronjob on server side...whats best method?
Think I could open a db connection and disable cart module in _extensions table?

Or is there a better solution?

Thanks in advance!

Tags:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How: Shop only open at opening hours

Post by Jan »

Hi, for now there is no such option, but this is great feature which can be used e.g. for lunch ordering (e.g. the seller will stop all the orders and 10:00 am)

This cannot be solved on Javascript side as there will be no check on the server.

I will try to look at it for the next version, e.g.:
- there will be two new parameters (opening from - opening to) - hours
- so when both will be set, it will be not allowed to make an order when the time will be over.

:idea:

Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How: Shop only open at opening hours

Post by Jan »

If you find Phoca extensions useful, please support the project
maintainthedomain
Phoca Member
Phoca Member
Posts: 46
Joined: 21 Sep 2018, 11:34

Re: How: Shop only open at opening hours

Post by maintainthedomain »

Cool, thanks for this.
Unfortunately I implemented a solution with pre-ordering already...so when restaurant is closed, users get a "its closed" notification and can preorder for a chosen time the next or current day...
So, that may be a good (real-world) addition to this new feature...
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How: Shop only open at opening hours

Post by Jan »

Hi, it depends on your settings. You can display the message that it is closed and add the information to the message that the order will be finished e.g. next day and in Options you just set that ordering is possible when the shop is closed:

Parameter: Checking Opening Times: allow
Added new parameter: Store Closed - Checkout Message

Image

Image

Jan
If you find Phoca extensions useful, please support the project
Post Reply