(E-Commerce)

Hi,

I have an on-line ordering system set up for a restaurant. It has a mini cart showing on the main page to show what you have ordered (rather than saying there are ‘x’ items in your basket).

In a specified section, there are 2 php files which have been included.

  • The Mini Cart
  • Open hours image

I want to be able to show the minicart when the restaurant is open (during 6-10pm) in addition to showing the open hours php file.

When the restaurant is closed, I want to be able to add a restriction which hides the minicart and only displays the open hours. However, as I am quite new to PHP, I am confused on how to add these time restrictions in this case. Below is some code of where I started, however could not think of how to add time restrictions and hence why I am posting on PHPhelp.

[php]

<?php If (/*time is from 6-10pm*/) { require_once 'include/miniCart.php'; include 'include/openHours.php'; } else { include 'include/openHours.php'; } ?>

[/php]

I would really appreciate the help. Thanks

Sponsor our Newsletter | Privacy Policy | Terms of Service