[상품 상세]

- 옵션 미선택시 add to cart눌럿을때 please select option 얼럿 뜨도록 변경.
This commit is contained in:
junghoon86.park
2025-11-21 13:38:15 +09:00
parent e6eccebb77
commit 6e9ebcfe3a

View File

@@ -1087,6 +1087,46 @@ const BuyOption = ({
optionForUse?.optNm || optionForUse?.prodOptCval || '';
if (!isMock) {
if (
productOptionInfos &&
productOptionInfos.length > 1 &&
productInfo?.optProdYn === 'Y'
) {
if (selectFirstOptionIndex === 0) {
dispatch(
showError(
null,
"PLEASE SELECT OPTION",
false,
null,
null
)
);
return;
}
}
if (
productOptionInfos[selectedBtnOptIdx]?.prdtOptDtl &&
productOptionInfos[selectedBtnOptIdx]?.prdtOptDtl.length > 1 &&
productInfo?.optProdYn === 'Y'
) {
if (selectSecondOptionIndex === 0) {
dispatch(
showError(
null,
"PLEASE SELECT OPTION",
false,
null,
null
)
);
return;
}
}
dispatch(
insertMyinfoCart({
mbrNo: userNumber,