nagasurendra commited on
Commit
67d2793
·
verified ·
1 Parent(s): 19e9ba1

Update templates/cart.html

Browse files
Files changed (1) hide show
  1. templates/cart.html +7 -1
templates/cart.html CHANGED
@@ -275,7 +275,13 @@
275
 
276
 
277
  function proceedToOrder() {
278
- const useRewardPoints = document.getElementById('rewardCheckbox').checked;
 
 
 
 
 
 
279
  fetch('/checkout', {
280
  method: 'POST',
281
  headers: { 'Content-Type': 'application/json' },
 
275
 
276
 
277
  function proceedToOrder() {
278
+ const checkbox = document.getElementById('rewardCheckbox');
279
+ let useRewardPoints = false;
280
+ if (checkbox) {
281
+ // If the checkbox exists, get its checked status
282
+ useRewardPoints = checkbox.checked;
283
+ }
284
+
285
  fetch('/checkout', {
286
  method: 'POST',
287
  headers: { 'Content-Type': 'application/json' },