lokesh341 commited on
Commit
dbeef0a
·
verified ·
1 Parent(s): a4ae61c

Update templates/menu_page.html

Browse files
Files changed (1) hide show
  1. templates/menu_page.html +12 -2
templates/menu_page.html CHANGED
@@ -91,8 +91,8 @@
91
  <div class="container" id="welcome-container">
92
  <h1>Welcome to the Biryani Hub Menu</h1>
93
  <div class="menu-option">
94
- <button id="veg-btn" onclick="showMenu('veg')">Vegetarian Menu</button>
95
- <button id="non-veg-btn" onclick="showMenu('nonVeg')">Non-Vegetarian Menu</button>
96
  </div>
97
  </div>
98
 
@@ -186,6 +186,7 @@
186
  cartItemsContainer.appendChild(div);
187
  });
188
  cartContainer.style.display = 'block';
 
189
  }
190
 
191
  // Function to place the final order
@@ -199,6 +200,15 @@
199
  }
200
  }
201
 
 
 
 
 
 
 
 
 
 
202
  // Voice Recognition for adding items and viewing cart
203
  const recognition = new (window.SpeechRecognition || window.webkitSpeechRecognition)();
204
  recognition.lang = 'en-US';
 
91
  <div class="container" id="welcome-container">
92
  <h1>Welcome to the Biryani Hub Menu</h1>
93
  <div class="menu-option">
94
+ <button onclick="showMenu('veg')">Vegetarian Menu</button>
95
+ <button onclick="showMenu('nonVeg')">Non-Vegetarian Menu</button>
96
  </div>
97
  </div>
98
 
 
186
  cartItemsContainer.appendChild(div);
187
  });
188
  cartContainer.style.display = 'block';
189
+ speakCartItems(); // Speak out the items in the cart
190
  }
191
 
192
  // Function to place the final order
 
200
  }
201
  }
202
 
203
+ // Speak out the items in the cart
204
+ function speakCartItems() {
205
+ let cartText = "Your cart contains: ";
206
+ cart.forEach(item => {
207
+ cartText += `${item.quantity} of ${item.name}, `;
208
+ });
209
+ speak(cartText, () => {});
210
+ }
211
+
212
  // Voice Recognition for adding items and viewing cart
213
  const recognition = new (window.SpeechRecognition || window.webkitSpeechRecognition)();
214
  recognition.lang = 'en-US';