cart.js
// Function to ensure quantity cannot be less than 0 
Function to ensure quantity cannot be less than 0
Function to ensure quantity cannot be less than 0
function quantityChanged(event) {
    var input = event.target
    if (isNaN(input.value) || input.value <= 0) {
        input.value = 1 
    }
    updateCartTotal()
}
function quantityChanged ( event ) { var input = event . target if ( isNaN ( input . value ) || input . value <= 0 ) { input . value = 1 } updateCartTotal ( ) }
Function to ensure quantity cannot be less than 0
Function to ensure quantity cannot be less than 0