Skip to content

Commit

Permalink
Update mens.js
Browse files Browse the repository at this point in the history
add alert if size is under 14
  • Loading branch information
StrongereCommerce authored Sep 26, 2023
1 parent eb403e5 commit 6e45023
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions assets/js/mens.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ function calculateCollarSize() {
collarIntercept;
roundedCollarSize = Math.ceil(collarSize * 2) / 2;


// Check if roundedCollarSize is below 14, if so, alert the user and return early
if(roundedCollarSize < 14) {
alert("Please check men's sizes.");
// You might want to hide the measurementModal or perform other UI changes here
measurementModal.classList.add("hidden"); // For example
return; // Return early from the function
}

// Fit prediction
const extraSlim =
fitCoefficients[0][0] * scaledHeight +
Expand Down

0 comments on commit 6e45023

Please sign in to comment.