To keep up with demand, restaurants of all sizes need to provide solutions that let customers browse their menus, select options, and pay for their carryout or delivery orders online. There are several online ordering systems for restaurants available in the market that help you create a customized ordering experience on your restaurant website or mobile app. They also allow restaurants to place QR codes around their restaurant for a contactless digital menu experience that takes diners to a restaurant’s online ordering system. To help you in your search for the best solution for your restaurant, we have highlighted the top 11 online ordering system options to consider. One best system is called GEU ordering system. Customise your GEU ordering system by writing a PHP code for two partial web pages for ordering food from GEU online store. ✓ The first page you will write is a form named geuorder.php that allows the user to choose what kind of food to buy and how many to buy. o In your form, include a drop-down menu of food items available to purchase. o Include a text box for the user to select or enter a quantity of the item to purchase and an "Order" button to submit the form. The food items to list should be based on what JPG food images are available in blackboard on the resource directory or folder. For example, if the food items contain banana.jpg and chicken.jpg, then " banana" and "chicken" appear in the drop-down list. Now, you can write the last portion of geu_order.php that would appear between, and , you may write your own CSS if need may be. ✓ The second page you need to write is named geu_submit-order.php. The form in geu_order.php submits its data as a POST request to geu_submitorder.php. The output of geu_submit-order.php is an HTML page fragment, a single paragraph indicating information about the order as described below. NB: Do not use print or echo statement. The GEU store’s current inventory is stored in a file named geu_system_inventory.txt on the server in the current directory. Each line of the file represents one item available in the store, its quantity available, and its price per unit, separated by tabs. Assume that the file exists, that its contents are valid, and that there are no duplicates. Here is an example inventory: In general, your task is to look up the price per unit of the item the user is ordering and use this price to compute the total order cost. For example, if the item costs R5.50 and the user orders 7 of them, the total order is 7 * 5.50 = R38.50. The page's output in the general successful case is to inform the user that the order was successful, display the total order cost (you do not need to round it), and show the user a series of images representing what was ordered. For example, if the user orders 4 apples, your output should display 4 copies of apple.jpg. Message: Order Successful R20 is your total price. Here is what you ordered {Display pictures of 4 apples} Here is another output from ordering 15 of the item cookies. (The output wraps to the next line in the browser) The store is only able to complete an order if that food item is in the geu system inventory and the store has enough of that item in stock. Message: Order Successful R20 is your total price. Here is what you ordered {Display pictures of 15 cookies} For example, if the inventory matches the above text file (which has 9 “tinfish” in stock), and the user tries to order 10 of “tinfish”, the following error should be displayed: The items in this geu system inventory may overlap with the images that were listed previously, but there might be some images that do not have representation in the inventory text file and vice versa. If an item is not present in the inventory file, assume that its quantity available in stock is 0 and display the same sort of error message. Error Message: Sorry we do not have 10 tinfish in stock You do not need to modify the geu_system_inventory.txt file or update its quantity of the item being ordered. If the food item or quantity parameters are not passed, issue an error. If they are present, you may assume that the food item value passed is a string and the quantity value passed is a positive integer.
To keep up with demand, restaurants of all sizes need to provide solutions that let
customers browse their menus, select options, and pay for their carryout or delivery
orders online. There are several online ordering systems for restaurants available in
the market that help you create a customized ordering experience on your restaurant
website or mobile app. They also allow restaurants to place QR codes around their
restaurant for a contactless digital menu experience that takes diners to a restaurant’s
online ordering system. To help you in your search for the best solution for your
restaurant, we have highlighted the top 11 online ordering system options to consider.
One best system is called GEU ordering system. Customise your GEU ordering
system by writing a PHP code for two partial web pages for ordering food from GEU
online store.
✓ The first page you will write is a form named geuorder.php that allows the user
to choose what kind of food to buy and how many to buy.
o In your form, include a drop-down menu of food items available to
purchase.
o Include a text box for the user to select or enter a quantity of the item to
purchase and an "Order" button to submit the form.
The food items to list should be based on what JPG food images are available in
blackboard on the resource directory or folder. For example, if the food items contain
banana.jpg and chicken.jpg, then " banana" and "chicken" appear in the drop-down
list.
Now, you can write the last portion of geu_order.php that would appear between,
<body>and </body>, you may write your own CSS if need may be.
✓ The second page you need to write is named geu_submit-order.php. The
form in geu_order.php submits its data as a POST request to geu_submitorder.php. The output of geu_submit-order.php is an HTML page fragment,
a single paragraph indicating information about the order as described below.
NB: Do not use print or echo statement.
The GEU store’s current inventory is stored in a file named
geu_system_inventory.txt on the server in the current directory. Each line of the file
represents one item available in the store, its quantity available, and its price per unit,
separated by tabs.
Assume that the file exists, that its contents are valid, and that there are no duplicates.
Here is an example inventory:
In general, your task is to look up the price per unit of the item the user is ordering and
use this price to compute the total order cost. For example, if the item costs R5.50 and
the user orders 7 of them, the total order is 7 * 5.50 = R38.50. The page's output in
the general successful case is to inform the user that the order was successful, display
the total order cost (you do not need to round it), and show the user a series of images
representing what was ordered. For example, if the user orders 4 apples, your output
should display 4 copies of apple.jpg.
Message: Order Successful R20 is your total price. Here is what you ordered
{Display pictures of 4 apples}
Here is another output from ordering 15 of the item cookies. (The output wraps to the
next line in the browser) The store is only able to complete an order if that food item
is in the geu system inventory and the store has enough of that item in stock.
Message: Order Successful R20 is your total price. Here is what you ordered
{Display pictures of 15 cookies}
For example, if the inventory matches the above text file (which has 9 “tinfish” in
stock), and the user tries to order 10 of “tinfish”, the following error should be
displayed: The items in this geu system inventory may overlap with the images that
were listed previously, but there might be some images that do not have
representation in the inventory text file and vice versa. If an item is not present in the
inventory file, assume that its quantity available in stock is 0 and display the same sort
of error message.
Error Message: Sorry we do not have 10 tinfish in stock
You do not need to modify the geu_system_inventory.txt file or update its quantity
of the item being ordered. If the food item or quantity parameters are not passed, issue
an error. If they are present, you may assume that the food item value passed is a
string and the quantity value passed is a positive integer.
Step by step
Solved in 3 steps with 3 images