콘텐츠로 건너뛰기
로그인
- 선택을 누르면 전체 페이지가 새로 고쳐집니다.
- 새 창에서 열립니다.
document.addEventListener('DOMContentLoaded', function () {
var submitButton = document.querySelector('.submit-for-review-btn'); // Adjust this selector as necessary
if (submitButton) {
submitButton.addEventListener('click', function (e) {
console.log('Submit button clicked'); // Check if button click is detected
var cartTotal = 0.00; // Total in dollars
console.log('Cart Total:', cartTotal); // Log the cart total for debugging
var minimumValue = 1000; // Minimum value in dollars ($1000)
if (parseFloat(cartTotal) < minimumValue) { // Ensure to parse as float for comparison
e.preventDefault(); // Prevent form submission
alert('Your order must be at least $1000 to submit for review.'); // Alert message
} else {
console.log('Order submitted successfully'); // Log successful submission
}
});
}
});