Forums
This topic is locked
two price ranges
Posted 22 Apr 2003 16:25:47
1
has voted
22 Apr 2003 16:25:47 Alfa Siete posted:
i have a database with products for sale, all of the products have a regular price and SOME products have a special offer price.i am using id cart, and i am seling wit a regular price cart and had to create a specialoffer cart, this is inconvinient for our costumers because they have to make separate orders for the regular and special products.
any ideas for including both ranges in the same car and asign the lowest price to the product??
¿Can this be done with ud cart or i need to switch to other?
Everybody should belive in something... I belive i'm having another beer
Replies
Replied 23 Apr 2003 09:22:43
23 Apr 2003 09:22:43 Vince Baker replied:
Some code like this should help (although I do not know the structure of the cart)
<% Dim strNormPrice, strSpecPrice, strDisplayPrice
strDisplayPrice = yourrecordsetname("Normal_Price"
If yourrecordsetname("Special_Price"
<> "" Then
strSpecPrice = yourrecordsetname("Special_Price"
strNormPrice = yourrecordsetname("NormalPrice"
If strSpecPrice < strNormPrice then strDisplayPrice = strSpecPrice
end if
end if
response.write(strDisplayPrice)
%>
Regards
Vince
Visit my home: www.chez-vince.com
VBScript | ASP | HTML | SQL | Oracle | Hosting
<% Dim strNormPrice, strSpecPrice, strDisplayPrice
strDisplayPrice = yourrecordsetname("Normal_Price"

If yourrecordsetname("Special_Price"

strSpecPrice = yourrecordsetname("Special_Price"

strNormPrice = yourrecordsetname("NormalPrice"

If strSpecPrice < strNormPrice then strDisplayPrice = strSpecPrice
end if
end if
response.write(strDisplayPrice)
%>
Regards
Vince
Visit my home: www.chez-vince.com
VBScript | ASP | HTML | SQL | Oracle | Hosting