I have created a 3-step restaurant menu items order form in HTML with JavaScript, but I am facing some issues with the functionality. The main problem lies in the order calculation.
Details of the 3 step form:
In menu.html :
The user can add menu items by clicking a button (image). The selected items will be displayed on the right side of the same page. Users can then click the checkout button.
In payment.html :
Here, only the selected items for the order are shown. Users can review them and then proceed to checkout.
In delivery.html :
Users will see their total order price and need to provide their name, address, city, etc., similar to a registration form. At the bottom, there is a "Place Order Now" button that, when clicked, notifies the site owner.
****** HTML code for menu.html ******
<li>
<div class="row">
<div class="col-xs-8">
<p>Grilled Fish Fillet</p>
</div>
<div class="col-xs-2">
<p>150 SR</p>
</div>
<div class="col-xs-2">
<button onclick="addtoCard('grilledfishfillet','Grilled Fish Fillet', 150)" style="border:none; background:none;"><img src="images/plus.jpg" alt=""></button>
</div>
</li>
****** Content for delivery.html******
<div id="OrderItem">
<input name="order1" placeholder="" type="text" id="order1" size="30" value="" class="form-control input-lg"><br>
<input name="order2" placeholder=" " type="text" id="order2" size="30" value="" class="form-control input-lg"><br>
<input name="order3" placeholder=" " type="text" id="order3" size="30" value="" class="form-control input-lg"><br>
<input name="order4" placeholder="" type="text" id="order4" size="30" value="" class="form-control input-lg"><br>
</div>
***** Details for payment.html page****
<div class="row">
<div class="col-sm-6">
<label>First Name</label>
<input name="name" type="text" id="name" size="30" value="" class="form-control input-lg">
</div>
<div class="col-sm-6">
<label>Last Name</label>
<input name="lname" type="text" id="lname" size="30" value="" class="form-control input-lg">
</div>
</div>
<div style="margin-top:40px;padding:5px 30px;" class="bg-color">
<div class="row">
<div class="col-xs-12">
<h3 style="padding-top:10px; text-align:center; font-size:24px;">Total : 246.00 SAR</h3>
</div>
</div>
</div>