{{vtScript}} {{vtInclude: includes/initialize.html}} {{vtRepeat: {vtGet:Cart} }} {{vtIf: {vtItem:id} .neq. {vtGetValue:item} }} {{vtSet: NewCart[]="{vtItem}" }} {{vtEndIf}} {{vtEndRepeat}} {{vtSet: Cart="{vtGet:NewCart}" }} {{vtCalc: discountCart() }} {{vtIf: {vtGet:Cart} .neq. {vtGet:NewCart} }} {{vtSet: Reload="reload"}} {{vtEndIf}} {{vtIf: {vtUser:id} .gt. 100 .and. {vtUser:accountType} .neq. 2 }} {{vtDo: -act="update", -obj="{vtUser:id}", Cart="{vtGet:Cart}"}} {{vtElse}} {{vtDo: -act="updateSession", Cart="{vtGet:Cart}"}} {{vtEndIf}} {{vtCalc: countList('{vtGet:Cart,escaped}') }} {{vtIf: {vtResult}.eq.0}} {{vtSet: StatusText="{vtGet:s_msg_0010,raw}"}} {{vtElseIf: {vtResult}.eq.1}} {{vtSet: StatusText="{vtGet:s_msg_0009,raw}"}} {{vtElse}} {{vtCalc: sprintf( '{vtGet:s_msg_0011,raw}', '{vtResult}' ) }} {{vtSet: StatusText}} {{vtEndIf}} {{vtIf: {vtGlobal:pxtcVatHandling} .bw. excl}} {{vtCalc: evalList('{vtGet:Cart,escaped}','nettotal','sum') }} {{vtElse}} {{vtCalc: evalList('{vtGet:Cart,escaped}','total','sum') }} {{vtEndIf}} {{vtSet: CartValue="{vtResult|num-en:2}" }} {{vtEndScript}}|{{vtGetValue:item}}|{{vtGet:StatusText,raw}}|{{vtGet:CartValue}}|{{vtGet:Reload}}