Index: branches/5.2.x/units/helpers/order_helper.php =================================================================== diff -u -N -r14827 -r14831 --- branches/5.2.x/units/helpers/order_helper.php (.../order_helper.php) (revision 14827) +++ branches/5.2.x/units/helpers/order_helper.php (.../order_helper.php) (revision 14831) @@ -35,6 +35,8 @@ $items->Query(); $items->GoFirst(); + $ret['order']['ItemsInCart'] = array_sum( $items->GetCol('Quantity') ); + if ( $items->EOL() ) { return $ret; } Index: branches/5.2.x/units/orders/orders_tag_processor.php =================================================================== diff -u -N -r14828 -r14831 --- branches/5.2.x/units/orders/orders_tag_processor.php (.../orders_tag_processor.php) (revision 14828) +++ branches/5.2.x/units/orders/orders_tag_processor.php (.../orders_tag_processor.php) (revision 14831) @@ -1,6 +1,6 @@ getObject($params); - if ($object->GetDBField('Status') != ORDER_STATUS_INCOMPLETE || $object->GetID() == FAKE_ORDER_ID) { + /* @var $object kDBItem */ + + if ( $object->GetDBField('Status') != ORDER_STATUS_INCOMPLETE || $object->GetID() == FAKE_ORDER_ID ) { return 0; } $object =& $this->Application->recallObject('orditems', 'orditems_List'); /* @var $object kDBList */ - return $object->GetRecordsCount(); + $object->Query(); + + return array_sum($object->GetCol('Quantity')); // $object->GetRecordsCount(); } function CartNotEmpty($params)