Add debug info to cart and setLineItem
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6af7e22b03
commit
639d789da1
2 changed files with 18 additions and 1 deletions
|
|
@ -128,7 +128,8 @@
|
||||||
"ItemParentName": qLI.ItemParentName ?: "",
|
"ItemParentName": qLI.ItemParentName ?: "",
|
||||||
"IsCheckedByDefault": val(qLI.IsCheckedByDefault),
|
"IsCheckedByDefault": val(qLI.IsCheckedByDefault),
|
||||||
"IsInvertedGroup": val(qLI.IsInvertedGroup),
|
"IsInvertedGroup": val(qLI.IsInvertedGroup),
|
||||||
"ParentIsInvertedGroup": val(qLI.ParentIsInvertedGroup)
|
"ParentIsInvertedGroup": val(qLI.ParentIsInvertedGroup),
|
||||||
|
"_debug": "Qty=#val(qLI.Quantity)# IsChkDef=#val(qLI.IsCheckedByDefault)# ParentInv=#val(qLI.ParentIsInvertedGroup)#"
|
||||||
})>
|
})>
|
||||||
<!--- Add to subtotal (root items only - modifiers are included in parent price) --->
|
<!--- Add to subtotal (root items only - modifiers are included in parent price) --->
|
||||||
<cfif val(qLI.ParentOrderLineItemID) EQ 0>
|
<cfif val(qLI.ParentOrderLineItemID) EQ 0>
|
||||||
|
|
|
||||||
|
|
@ -433,6 +433,22 @@
|
||||||
{ datasource = "payfrit" }
|
{ datasource = "payfrit" }
|
||||||
)>
|
)>
|
||||||
<cfelse>
|
<cfelse>
|
||||||
|
<!--- Log search params for debugging --->
|
||||||
|
<cfif NOT IsSelected>
|
||||||
|
<cfset arrayAppend(request.attachDebug, "DESELECT SEARCH: OrderID=#OrderID#, ParentLI=#ParentLineItemID#, ItemID=#ItemID#")>
|
||||||
|
<!--- Also check what items exist for this order with this ItemID --->
|
||||||
|
<cfset qDebug = queryTimed(
|
||||||
|
"SELECT ID, ParentOrderLineItemID, Quantity, IsDeleted FROM OrderLineItems WHERE OrderID = ? AND ItemID = ?",
|
||||||
|
[
|
||||||
|
{ value = OrderID, cfsqltype = "cf_sql_integer" },
|
||||||
|
{ value = ItemID, cfsqltype = "cf_sql_integer" }
|
||||||
|
],
|
||||||
|
{ datasource = "payfrit" }
|
||||||
|
)>
|
||||||
|
<cfloop query="qDebug">
|
||||||
|
<cfset arrayAppend(request.attachDebug, " FOUND: LIID=#qDebug.ID# ParentLI=#qDebug.ParentOrderLineItemID# Qty=#qDebug.Quantity# Del=#qDebug.IsDeleted#")>
|
||||||
|
</cfloop>
|
||||||
|
</cfif>
|
||||||
<cfset qExisting = queryTimed(
|
<cfset qExisting = queryTimed(
|
||||||
"
|
"
|
||||||
SELECT ID
|
SELECT ID
|
||||||
|
|
|
||||||
Reference in a new issue