Index: modules/in-commerce/units/orders/orders_tag_processor.php =================================================================== --- modules/in-commerce/units/orders/orders_tag_processor.php +++ modules/in-commerce/units/orders/orders_tag_processor.php @@ -98,11 +98,18 @@ function PrintCart($params) { $o = ''; + $o_items = ''; - $params['render_as'] = $params['item_render_as']; - $tag_params = array_merge($params, Array ('per_page' => -1)); - - $o_items = $this->Application->ProcessParsedTag(rtrim('orditems.' . $this->Special, '.'), 'PrintList', $tag_params); + if ( $this->orderExists($params) ) { + $params['render_as'] = $params['item_render_as']; + $tag_params = array_merge($params, array('per_page' => -1)); + + $o_items = $this->Application->ProcessParsedTag( + rtrim('orditems.' . $this->Special, '.'), + 'PrintList', + $tag_params + ); + } if ( $o_items ) { if ( isset($params['header_render_as']) ) { @@ -192,9 +199,7 @@ function CartNotEmpty($params) { - $object = $this->getObject($params); - - if ($object->GetDBField('Status') != ORDER_STATUS_INCOMPLETE || $object->GetID() == FAKE_ORDER_ID) { + if ( !$this->orderExists($params) ) { return 0; } @@ -209,6 +214,24 @@ return 0; } + /** + * Checks order is exists. + * + * @param array $params Tag params. + * + * @return boolean + */ + protected function orderExists(array $params) + { + $object = $this->getObject($params); + + if ( $object->GetDBField('Status') != ORDER_STATUS_INCOMPLETE || $object->GetID() == FAKE_ORDER_ID ) { + return false; + } + + return true; + } + function CartIsEmpty($params) { return $this->CartNotEmpty($params) ? false : true; Index: themes/advanced/in-commerce/checkout/shop_cart.tpl =================================================================== --- themes/advanced/in-commerce/checkout/shop_cart.tpl +++ themes/advanced/in-commerce/checkout/shop_cart.tpl @@ -6,7 +6,7 @@ - () + () @@ -38,7 +38,7 @@
- () + ()