Spaces:
Sleeping
Sleeping
Update templates/cart.html
Browse files- templates/cart.html +2 -1
templates/cart.html
CHANGED
|
@@ -569,13 +569,14 @@
|
|
| 569 |
|
| 570 |
|
| 571 |
|
|
|
|
| 572 |
function proceedToOrder() {
|
| 573 |
let couponDropdown = document.getElementById('couponDropdown');
|
| 574 |
|
| 575 |
// Check if the coupon dropdown exists and is visible
|
| 576 |
let selectedCoupon = ""; // Default to an empty string if no coupon dropdown exists
|
| 577 |
if (couponDropdown) {
|
| 578 |
-
selectedCoupon = couponDropdown.value.trim(); //
|
| 579 |
}
|
| 580 |
|
| 581 |
// Proceed without coupon if none is selected (or if dropdown is missing)
|
|
|
|
| 569 |
|
| 570 |
|
| 571 |
|
| 572 |
+
|
| 573 |
function proceedToOrder() {
|
| 574 |
let couponDropdown = document.getElementById('couponDropdown');
|
| 575 |
|
| 576 |
// Check if the coupon dropdown exists and is visible
|
| 577 |
let selectedCoupon = ""; // Default to an empty string if no coupon dropdown exists
|
| 578 |
if (couponDropdown) {
|
| 579 |
+
selectedCoupon = couponDropdown.value ? couponDropdown.value.trim() : ""; // Safely handle if value is null or undefined
|
| 580 |
}
|
| 581 |
|
| 582 |
// Proceed without coupon if none is selected (or if dropdown is missing)
|