From 6e45023da85e9b8067ee6762d9323c8174839356 Mon Sep 17 00:00:00 2001 From: StrongereCommerce <86730095+StrongereCommerce@users.noreply.github.com> Date: Tue, 26 Sep 2023 07:42:09 -0400 Subject: [PATCH] Update mens.js add alert if size is under 14 --- assets/js/mens.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/assets/js/mens.js b/assets/js/mens.js index c5b397a..16c6b3e 100644 --- a/assets/js/mens.js +++ b/assets/js/mens.js @@ -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 +