Fix inverted modifier not removing from cart

When deselecting a modifier (IsSelected=false), Quantity was incorrectly
set to 1 instead of 0, preventing the removal logic from working.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
John Pinkyfloyd 2026-03-08 21:24:46 -07:00
parent 588e6ef26d
commit 446addd66d

View file

@ -347,11 +347,11 @@
<cfset apiAbort({ "OK": false, "ERROR": "bad_quantity", "MESSAGE": "Root line items require Quantity > 0.", "DETAIL": "" })>
</cfif>
<cfelse>
<!--- Modifier quantity is implicitly tied => force 1 when selecting --->
<!--- Modifier quantity is implicitly tied => force 1 when selecting, 0 when deselecting --->
<cfif IsSelected>
<cfset Quantity = 1>
<cfelse>
<cfset Quantity = 1>
<cfset Quantity = 0>
</cfif>
<!--- Check if this is an exclusive selection group (max = 1) --->