Skip to content
Log in
- Choosing a selection results in a full page refresh.
- Opens in a new window.
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
}
});
}
});