1

代码在这里运行代码功能是 AddItem1 已注释

Sub UseCase1
'AddItem1

For i = 0 to val
np=i
no=i+1
fnname = " AddItem " & no
Sub fnname
Dim MyItem
Set MyItem = New Item
itemname = "itemname" & i
val6=Request.Form(""& itemname &"")
val6 = Trim(va6)
itemprice = "itemprice"& i
val7=Request.Form(""& itemprice &"")
val7 = Trim(val7)
itemqty = "itemqty" & i
val8=Request.Form(""& itemqty &"")
val8 = Trim(val8)
itemdes = "itemdes" & i
val9=Request.Form(""& itemdes &"")
val9 = Trim(val9)
MyItem.Name = val6
MyItem.Description = val9
MyItem.Quantity =val8
MyItem.UnitPrice = val7
MyItem.MerchantPrivateItemData = "<color>blue</color><weight>3.2</weight><websiteName></websiteName>"
MyItem.ItemWeight = 5.5
MyCart.AddItem MyItem
Set MyItem = Nothing
End Sub
Next


SetOptionalParameters

End Sub

defination:after call
commented code
'Sub AddItem1
    'Dim MyItem
    'Set MyItem = New Item
    'MyItem.Name = Name
    'MyItem.Description = desc
    'MyItem.Quantity =1
    'MyItem.UnitPrice = intcurTotalAmount
    'MyItem.MerchantPrivateItemData = "<color>blue</color><weight>3.2</weight><websiteName>theeflowertest.com</websiteName>"
    'MyItem.ItemWeight = 5.5
    'MyCart.AddItem MyItem
    'Set MyItem = Nothing
'End Sub
4

0 回答 0