Hi!
I have created an eCommerce site. And I would like to add delivery fee depending on the weight of the product we sell.
I managed to calculate the total weight but do not know how to calculate shipping fee. Below is the calculation code. I added IF statement such as IF wTotal < 1000 THEN deliveryPrice = 20.00
However, this does not work.
Can anyone help me??
<%
FOR i = 0 TO UBOUND( localCart, 2 )
IF localCart( CARTPID, i ) <> "" THEN
orderTotal = orderTotal + ( localCart( CARTPPRICE, i ) * localCart( CARTPQUANTITY, i ) )
taxTotal = (orderTotal + 10.00) * 0.175
payTotal = (orderTotal + 10.00) + taxTotal
wTotal = wTotal + ( localCart( CARTPWEIGHT, i ) * localCart( CARTPQUANTITY, i ))
%>
I have created an eCommerce site. And I would like to add delivery fee depending on the weight of the product we sell.
I managed to calculate the total weight but do not know how to calculate shipping fee. Below is the calculation code. I added IF statement such as IF wTotal < 1000 THEN deliveryPrice = 20.00
However, this does not work.
Can anyone help me??
<%
FOR i = 0 TO UBOUND( localCart, 2 )
IF localCart( CARTPID, i ) <> "" THEN
orderTotal = orderTotal + ( localCart( CARTPPRICE, i ) * localCart( CARTPQUANTITY, i ) )
taxTotal = (orderTotal + 10.00) * 0.175
payTotal = (orderTotal + 10.00) + taxTotal
wTotal = wTotal + ( localCart( CARTPWEIGHT, i ) * localCart( CARTPQUANTITY, i ))
%>