[Skip to main content](#vessel-content)

#   Checkout business hours. Need to be closed Sunday.

##

- **[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")**
- [![TerryHikashop's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31464-terryhikashop "View TerryHikashop's Profile") Topic Author
- [ Offline](/forum/user/31464-terryhikashop)

Less More

- Posts: 50
- Thank you received: 3
-
-

12 years 8 months ago [\#147486](#147486) by [TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")  *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#147486 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")* was created by *[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")*

-- url of the page with the problem -- : [ www.fricanospizzaalpine.com/order-online](https://www.fricanospizzaalpine.com/order-online)
-- HikaShop version -- : HikaShop Essential 2.3.0
-- Joomla version -- : 3.2.3
-- PHP version -- : 5.4.23
-- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518

The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.

How do we prevent online orders on Sunday?

Also, business hours are different on Friday and Saturday.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 8 months ago [\#147512](#147512) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#147512 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")*

Hi,

The open/close hour system is coded in the view "checkout &#124; step".
You can override the view in order to change the rules. So thanks to it you can refuse to checkout during Sunday.
You can also put different hours depending the current day.

Regards,

PS : No need to send me a private message. We answer to all question but the week end more than other days, please be patient. Like you we are trying to taking some rest during the week end ![:)](/media/kunena/emoticons/3.png ":)")

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")**
- [![TerryHikashop's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31464-terryhikashop "View TerryHikashop's Profile") Topic Author
- [ Offline](/forum/user/31464-terryhikashop)

Less More

- Posts: 50
- Thank you received: 3
-
-

12 years 8 months ago [\#147544](#147544) by [TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")  Replied by *[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")* on topic *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#147544 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")*

Okay that is good news. Please give me complete instructions because I'm fairly new to your system and I do not know PHP or anything.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

12 years 8 months ago [\#147558](#147558) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#147558 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")*

At the beginning of the file "step" of the view "checkout" that you can edit via the menu Display&gt;Views, you can add such code: Code:

if(date('w')==0){$closed = true;}

after the line: Code:

$closed=false;

The following user(s) said Thank You: [TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")**
- [![TerryHikashop's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31464-terryhikashop "View TerryHikashop's Profile") Topic Author
- [ Offline](/forum/user/31464-terryhikashop)

Less More

- Posts: 50
- Thank you received: 3
-
-

12 years 8 months ago [\#147570](#147570) by [TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")  Replied by *[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")* on topic *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#147570 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")*

How do I specify Sunday? All I see in that code is 'w'

How do I set different hours for Friday/Saturday?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 8 months ago [\#147582](#147582) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#147582 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")*

Hi,

Please use the code that Nicolas gave you.
You just have to copy/paste it where he indicates you.

Doing such modifications requires some PHP/Development knowledge.
You need to detect the current day (using part of code that Nicolas gave you) and then change the open hour configuration depending this current day.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")**
- [![TerryHikashop's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31464-terryhikashop "View TerryHikashop's Profile") Topic Author
- [ Offline](/forum/user/31464-terryhikashop)

Less More

- Posts: 50
- Thank you received: 3
-
-

12 years 8 months ago [\#147602](#147602) by [TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")  Replied by *[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")* on topic *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#147602 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")*

Please provide the entire code and instructions because this would be the key to allow others to use your cart for restaurants.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

12 years 8 months ago -  12 years 8 months ago [\#147615](#147615) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#147615 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")*

Hi,
At the beginning of the file "step" of the view "checkout" that you can edit via the menu Display&gt;Views, you should add that code: Code:

if(date('w')==0){$closed = true;}

after the line: Code:

$closed=false;

Last edit: 12 years 8 months ago by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile").

The following user(s) said Thank You: [TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")**
- [![TerryHikashop's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31464-terryhikashop "View TerryHikashop's Profile") Topic Author
- [ Offline](/forum/user/31464-terryhikashop)

Less More

- Posts: 50
- Thank you received: 3
-
-

12 years 8 months ago [\#147955](#147955) by [TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")  Replied by *[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")* on topic *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#147955 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")*

It did work. It appears that Sunday is 1 so the code is:

if(date('w')==1){$closed = true;}

and needs to be placed after the first instance of:

$closed=false;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")**
- [![TerryHikashop's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31464-terryhikashop "View TerryHikashop's Profile") Topic Author
- [ Offline](/forum/user/31464-terryhikashop)

Less More

- Posts: 50
- Thank you received: 3
-
-

12 years 8 months ago [\#147971](#147971) by [TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")  Replied by *[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")* on topic *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#147971 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")*

What is the code to change the open hour configuration depending the current day?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

12 years 8 months ago [\#147984](#147984) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#147984 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")*

For example if you want your store to be closed Sunday from 1 AM to 11 AM you'll have to use that kind of code : Code:

if(date('w')==1 &amp;&amp; date('G') &lt;= 1 &amp;&amp; date('G') &gt;= 11){$closed = true;}

Note that reading that "date" php [ documentation ](https://php.net/manual/en/function.date.php)will probably help you.

The following user(s) said Thank You: [TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")**
- [![TerryHikashop's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31464-terryhikashop "View TerryHikashop's Profile") Topic Author
- [ Offline](/forum/user/31464-terryhikashop)

Less More

- Posts: 50
- Thank you received: 3
-
-

12 years 8 months ago [\#148207](#148207) by [TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")  Replied by *[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")* on topic *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#148207 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")*

I tried placing the code in many places. It did not work. Where exactly do I place it?

if(date('w')==1 &amp;&amp; date('G') &lt;= 1 &amp;&amp; date('G') &gt;= 11){$closed = true;}

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

12 years 8 months ago [\#148299](#148299) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#148299 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")*

You'll just have to replace this code : Code:

if(date('w')==1){$closed = true;}

And add that code for example : Code:

if(date('w')==1 &amp;&amp; date('G') &lt;= 1 &amp;&amp; date('G') &gt;= 11){$closed = true;}

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")**
- [![TerryHikashop's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31464-terryhikashop "View TerryHikashop's Profile") Topic Author
- [ Offline](/forum/user/31464-terryhikashop)

Less More

- Posts: 50
- Thank you received: 3
-
-

12 years 8 months ago [\#148407](#148407) by [TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")  Replied by *[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")* on topic *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#148407 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")*

I have success on closed Sunday.
How to have store open Monday - Thursday: Noon - 9 p.m. and Friday - Saturday: Noon - 10 p.m.?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 8 months ago [\#148413](#148413) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#148413 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")*

Hi,

Replace Code:

$open_hour = $this-&gt;config-&gt;get('store_open_hour',0); $close_hour = $this-&gt;config-&gt;get('store_close_hour',0); $open_minute = $this-&gt;config-&gt;get('store_open_minute',0); $close_minute = $this-&gt;config-&gt;get('store_close_minute',0);

By Code:

$open_hour = $this-&gt;config-&gt;get('store_open_hour',0); $close_hour = $this-&gt;config-&gt;get('store_close_hour',0); $open_minute = $this-&gt;config-&gt;get('store_open_minute',0); $close_minute = $this-&gt;config-&gt;get('store_close_minute',0); if(date('w')==1) { // Monday $open_hour = 9; $close_hour = 22; $open_minute = 0; $close_minute = 0; }

And replace Code:

$current_hour = hikashop_getDate(time(),'%H'); $current_minute = hikashop_getDate(time(),'%M'); $closed=false;

By Code:

$current_hour = hikashop_getDate(time(),'%H'); $current_minute = hikashop_getDate(time(),'%M'); $closed=false; if(date('w')==0) { // Sunday $closed=true; }

Please understand that we won't provide you more PHP code for that. It will become more than custom development than support.
If you want to go further, please look for a PHP developer.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")**
- [![TerryHikashop's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31464-terryhikashop "View TerryHikashop's Profile") Topic Author
- [ Offline](/forum/user/31464-terryhikashop)

Less More

- Posts: 50
- Thank you received: 3
-
-

12 years 8 months ago [\#149357](#149357) by [TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")  Replied by *[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")* on topic *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#149357 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")*

The Hikashop value returned in the check for time is correct and how I want it and it is the same time as my location.
But where do you get the day of the week from?
The day of the week check in Hikashop is returning the value of UTC time which is different than my location and right now is Monday when it is actually 8 pm Sunday here, so my store opens back up, thinking it is Monday.
I tried replacing the 3 occurances of "time()" by "new JDate()" without success.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

12 years 8 months ago [\#149381](#149381) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#149381 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")*

It's probably because of your timezone difference. You would have to add the timezone difference to the timestamp returned.
For example:
echo time(); //will return the UTC timestamp
echo (time()+3*60*60); //will return the UTC timestamp plus 3 hours (3*60*60 is the number of seconds in 3 hours).

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")**
- [![TerryHikashop's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31464-terryhikashop "View TerryHikashop's Profile") Topic Author
- [ Offline](/forum/user/31464-terryhikashop)

Less More

- Posts: 50
- Thank you received: 3
-
-

12 years 8 months ago [\#149482](#149482) by [TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")  Replied by *[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")* on topic *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#149482 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")*

But the store does open and close at the correct time on other days. So isn't it something with your code?

Example:
In views/step I have the store set to close on Sunday.
In configuration I set the open and close time of 12 and 21. That is exactly when the store opens and closes on all other days.
However on Sunday at 20 hours, (8 pm Sunday here, USA Eastern time, with is midnight UTC because UTC is + 4 hours from here) my store opens back up, because it is thinking it is Monday?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

12 years 8 months ago [\#149495](#149495) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#149495 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")*

Why would it be something with the code of HikaShop ? The fact that it works with the other days means that it is with your custom code, not with the default code of HikaShop.
It's probably that line:
if(date('w')==1 &amp;&amp; date('G') &lt;= 1 &amp;&amp; date('G') &gt;= 11){$closed = true;}

You probably need to adapt the conditions for the timezone difference.

Please understand that we're already way past normal support here... If you need to do advanced PHP modifications without any PHP knowledge, and that you don't want to read and understand the documentation of the date function that we gave you, please look for a third party developer to help you with the modifications you want.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")**
- [![TerryHikashop's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31464-terryhikashop "View TerryHikashop's Profile") Topic Author
- [ Offline](/forum/user/31464-terryhikashop)

Less More

- Posts: 50
- Thank you received: 3
-
-

12 years 8 months ago [\#149740](#149740) by [TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")  Replied by *[TerryHikashop](/forum/user/31464-terryhikashop "View TerryHikashop's Profile")* on topic *[Checkout business hours. Need to be closed Sunday.](/forum/27-checkout/866480-checkout-business-hours-need-to-be-closed-sunday#149740 "-- url of the page with the problem -- :   www.fricanospizzaalpine.com/order-online  -- HikaShop version -- : HikaShop Essential 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- : 5.4.23 -- Browser(s) name and version -- : Internet Explorer 11.0.9600.16518  The business is closed on Sunday so therefore cannot accept online orders for pizzas that day of the week. In Configuration/Checkout - Business Hours, there is only Opens at and Closes at.  How do we prevent online orders on Sunday?  Also, business hours are different on Friday and Saturday.")*

After all this work, I have failed to set anything as desired. My step file is back to default. I just have a store open 7 days a week from 12 pm to 9 pm. I want my store open from 12-9 M-Th and 12-10 F-S. Closed Sunday.

The drop down selections in configuration are too limiting.

Please consider making the functionality I need as part of the baseline business software set in configuration drop down menus.
We should be able to have the store open when we want.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NjQ4MC1jaGVja291dC1idXNpbmVzcy1ob3Vycy1uZWVkLXRvLWJlLWNsb3NlZC1zdW5kYXk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.101 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
