Spaces:
Runtime error
Runtime error
Update templates/cart.html
Browse files- templates/cart.html +7 -1
templates/cart.html
CHANGED
|
@@ -275,7 +275,13 @@
|
|
| 275 |
|
| 276 |
|
| 277 |
function proceedToOrder() {
|
| 278 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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' },
|