<%=dictLanguage.Item(Session("language")&"_showcart_4")%>
<%=dictLanguage.Item(Session("language")&"_showcart_5")%>
<%=dictLanguage.Item(Session("language")&"_showcart_6")%>
<%=dictLanguage.Item(Session("language")&"_showcart_7")%>
<%=dictLanguage.Item(Session("language")&"_showcart_8")%>
<%=dictLanguage.Item(Session("language")&"_showcart_9")%>
<%
' get all products in the cart
mySQL="SELECT idCartRow, cartRows.idProduct, quantity, unitPrice, unitBtoBPrice, description, sku, deliveringTime, personalizationDesc FROM cartRows, products WHERE cartRows.idProduct=products.idProduct AND cartRows.idDbSessionCart="&pIdDbSessionCart
call getFromDatabase(mySQL, rstemp, "showCart")
do while not rstemp.eof
pIdCartRow = rstemp("idCartRow")
pIdProduct = rstemp("idProduct")
pQuantity = rstemp("quantity")
pUnitPrice = Cdbl(rstemp("unitPrice"))
pUnitBtoBPrice = Cdbl(rstemp("unitBtoBPrice"))
pDescription = rstemp("description")
pSku = rstemp("sku")
pDeliveringTime = rstemp("deliveringTime")
pPersonalizationDesc = rstemp("personalizationDesc")
' check if the product has a free product or is a free product
mySQL="SELECT idProductFree FROM getFreeProduct WHERE idProduct="&pIdProduct
call getFromDatabase (mySql, rsTemp7, "showCart")
if not rstemp7.eof then
pItHasFreeProduct=-1
else
pItHasFreeProduct=0
end if
switchProductsLanguage session("language"), pIdProduct, pDetails, pDescription
%>
<%if pItHasFreeProduct=0 and pUnitPrice+pUnitBtoBPrice>0 then%>
<%else%>
<%=pQuantity%>
<%end if%>
<%
if pSku="" then
' use idProduct
response.write pIdProduct
else
' use sku
response.write pSku
end if%>
<%=pDescription%>
<%if pPersonalizationDesc<>"" then response.write " (" &pPersonalizationDesc& ")"%>
<%
pOptionGroupsTotal=0
' get optionals for current cart row
mySQL="SELECT options.idOption as myIdOption, optionDescrip, priceToAdd FROM options, cartRowsOptions WHERE options.idOption=cartRowsOptions.idOption AND idCartRow="&pIdCartRow
call getFromDatabase(mySQL, rstemp2, "showCart")
do while not rstemp2.eof
pIdOption = rstemp2("myIdOption")
pOptionDescrip = rstemp2("optionDescrip")
pPriceToAdd = rstemp2("priceToAdd")
switchOptionsLanguage session("language"), pIdOption, pOptionDescrip
response.write pOptionDescrip
if pPriceToAdd>0 then
response.write " "&pCurrencySign & money(pPriceToAdd)
end if
response.write " "
pOptionGroupsTotal = pOptionGroupsTotal+ pPriceToAdd
rstemp2.movenext
loop
%>
<%
' for Retail or WholeSale without btob price assigned shows Retail Price
if pIdCustomerType=1 or (pIdCustomerType=2 and pUnitBtoBPrice=0) then
pRowPrice = Cdbl(pQuantity * (pOptionGroupsTotal+pUnitPrice) )
else
pRowPrice = Cdbl(pQuantity * (pOptionGroupsTotal+pUnitBtoBPrice) )
end if%>
<%=pCurrencySign & money(pRowPrice) %>
<%= dictLanguage.Item(Session("language")&"_showcart_10")%>
<%
total = total + pRowPrice
if Cint(pDeliveringTime)>totalDeliveringTime then
totalDeliveringTime = Cint(pDeliveringTime)
end if
rstemp.moveNext
loop%>