Question
post all codes pls Post all codes please!! This assignment is based on the bakery from Assignment 2. In this assignment, we will assume all
Post all codes please!!
This assignment is based on the bakery from Assignment 2. In this assignment, we will assume all baker items cost $9.99.
1) The bakery has a discount scheme depending on the number of bakery items purchased. For example, It between one to three bakery items are purchased, each costs the regular price of $9.99. If between four to ten candies are purchased, the first three cost $9.99 and then the discount for the rest is 10%. It 11 or more are purchased, the tirst three items cost $9.99 each, the discount for the next 8 candies 3r to fut candies) Is 10%, and that for the remaining candies (11th onwards) is 20%. However, each order is restricted to only 50 bakery items, due to baking constraints. hence customers cannot order more than 50 items at a time Delivery is free for orders that cost more than $100. For orders less than $100, the cost of delivery is $10. In-store Dick-un is tree. Hence. for example. it a customer orders 12 bakery items. the tota due would be 99 + 7*(9.99-(0.1*9.99)) + 2*(9.99-(0.2*9.99)) = $108.90. Create a bakery order form that asks the customer for their name, address, the number of bakery items they would like to order and allows them to choose whether they would like to have the order picked-up or delivered. Placing an order should lead to a confirmation page which displays the following: The customer's tul name and address
The number of bakery items ordered
The mode of delivery selected (delivery or pick-up)
The subtotal due after applicable discounts are applied
The total amount due after adding the subtotal from above, any delivery tees it
applicable) and an additional 10% sales tax, shown to 2 decimal places.
Make sure to check for blank inputs or error inputs in the order form, and give appropriate error or warning messages in each case.
(25 points)
2 The bakery wants all orders saved in a flat file. For each order, save the tollowing information:
The order date
The customer name The total amount in the receipt
The text file should be named "bakery.txt" and saved within your htdocs folder (inside the same subfolder the PHP script is in). Each of the above fields should be separated by semi-colons. Each new order should be appended on a new line every time a customer submits the order form. Make sure to use appropriate open/close, lock unlock tunctions and modes, and show error messages when needed.
(15 points)
What to Submit to D2L?
Submit the following two files to the assigned D2L assignment space.
- Zip up (compress) all your source code files (e.g. HTML, CSS, PHP, etc.) for your website. Submit the zip file to D2L.
- Capture screenshots of each page with your own inputs and displayed outputs, including the output on the text file. Place these screenshots on a PowerPoint or Word document, and submit the file on D2L. Do NOT include this document in the above zip file - submit the document as a separate file into the D2L assignment space.
Note: This is so that in case your website does not show up correctly on my end, I can view your screenshots from within D2L. If no file with screenshots is included in the submission (-4 points), if document is mistakenly placed within the zip file (-2 points).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started