feat(카페24): 옵션/품목 팝업에 재고관리·재고 수량·품절표시 설정

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 10:07:53 +09:00
parent c39139a605
commit b0e816cbdc
6 changed files with 84 additions and 32 deletions
+9 -1
View File
@@ -1106,9 +1106,17 @@ def build_variant_updates(rows: list[dict]) -> list[dict]:
amount = parse_additional_amount(row["additional_amount"])
if amount is not None:
item["additional_amount"] = amount
for flag in ("display", "selling"):
for flag in ("display", "selling", "use_inventory", "display_soldout"):
if row.get(flag) is not None:
item[flag] = "T" if parse_tristate(row[flag]) else "F"
if row.get("quantity") is not None and str(row["quantity"]).strip() != "":
try:
qty = int(str(row["quantity"]).strip().replace(",", ""))
except ValueError:
raise ValueError("재고 수량은 숫자여야 합니다.") from None
if not 0 <= qty <= ADDITIONAL_AMOUNT_MAX:
raise ValueError("재고 수량은 0 이상이어야 합니다.")
item["quantity"] = qty
# 진열 순서(1~300) — 카페24 문서: 조합형 옵션 품목에만. 화면의 드래그 정렬이 보낸다.
if row.get("display_order") is not None:
try: