关于asp购物车的问题

客户要做一下订物车,购买数量不同,出现不同的报价。我自已写了一段,读取显示相关的报价,,其它价钱数量改变了,还是显示到一个价钱。其它的价格显示不对。请大家帮忙看看要代码怎样写.

count=订购数量

ps3=设定订购数值

pf3=设定的订购价格

cash2=购物车显示的价格

if count>=ps3 then
cash2=pf3
else
if count>=ps2 then
cash2=pf2
else
if count>=ps1 then
cash2=pf1
else
if count>=1 then
cash2=hw_cash
end if
end if
end if
end if
楼下的代码我试了一下,只能得到hw_cash和pf3的数值,中间pf1,pf2数值出不了.

第1个回答  2008-07-10
If count >= 1 And count < ps1 Then
cash2 = hw_cash
ElseIf count >= ps1 And count < ps2 Then
cash2 = pf1
ElseIf count >= ps2 And count < ps3 Then
cash2 = pf2
ElseIf count >= ps3 Then
cash2 = pf3
Else
''小于或等于0的看你要怎么处理
End If
相似回答