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:
parent
588e6ef26d
commit
446addd66d
1 changed files with 2 additions and 2 deletions
|
|
@ -347,11 +347,11 @@
|
||||||
<cfset apiAbort({ "OK": false, "ERROR": "bad_quantity", "MESSAGE": "Root line items require Quantity > 0.", "DETAIL": "" })>
|
<cfset apiAbort({ "OK": false, "ERROR": "bad_quantity", "MESSAGE": "Root line items require Quantity > 0.", "DETAIL": "" })>
|
||||||
</cfif>
|
</cfif>
|
||||||
<cfelse>
|
<cfelse>
|
||||||
<!--- Modifier quantity is implicitly tied => force 1 when selecting --->
|
<!--- Modifier quantity is implicitly tied => force 1 when selecting, 0 when deselecting --->
|
||||||
<cfif IsSelected>
|
<cfif IsSelected>
|
||||||
<cfset Quantity = 1>
|
<cfset Quantity = 1>
|
||||||
<cfelse>
|
<cfelse>
|
||||||
<cfset Quantity = 1>
|
<cfset Quantity = 0>
|
||||||
</cfif>
|
</cfif>
|
||||||
|
|
||||||
<!--- Check if this is an exclusive selection group (max = 1) --->
|
<!--- Check if this is an exclusive selection group (max = 1) --->
|
||||||
|
|
|
||||||
Reference in a new issue