A
Adam
Hello.
Let's say I have a dropdown in a form like this:
<SELECT NAME = "ShippingMethod">
<OPTION VALUE = "ptbship:Standard Ground Service" shipindex="1"
shipcost="9.00">Standard Ground Service ($9.00)</OPTION>
<OPTION VALUE = "ptbship:2 Day Express" shipindex="2" shipcost="20.00">2
Day Express ($20.00)</OPTION>
<OPTION VALUE = "ptbship:Next Day Express" shipindex="3" shipcost="45.00">
Next Day Express ($45.00)</OPTION>
</SELECT>
And let's say I also have a seperate subtotal figured out. For discussion
sake let's say I know it is already $50.
I need to do the following:
First I need to add the subtotal and the shipcost amount together. So in
this case the subtotal is 50.00 and someone selects option2 with a shipcost
of 20.00 so that would make 70.
Then I need to figure out tax on that new subtotal. Tax is 8.35% (.0835).
Finally I need to display it all like so:
Subtotal: $50.00
Shipping: $20.00 (in the case someone picked option 2 above)
Tax: $5.85 (rounded off to 2 decimal places)
Total: $72.85
Can someone help me with this? I've been fiddling with some stuff I found
on directdrive.com and other places but not getting any joy yet. Thanks
very much.
Let's say I have a dropdown in a form like this:
<SELECT NAME = "ShippingMethod">
<OPTION VALUE = "ptbship:Standard Ground Service" shipindex="1"
shipcost="9.00">Standard Ground Service ($9.00)</OPTION>
<OPTION VALUE = "ptbship:2 Day Express" shipindex="2" shipcost="20.00">2
Day Express ($20.00)</OPTION>
<OPTION VALUE = "ptbship:Next Day Express" shipindex="3" shipcost="45.00">
Next Day Express ($45.00)</OPTION>
</SELECT>
And let's say I also have a seperate subtotal figured out. For discussion
sake let's say I know it is already $50.
I need to do the following:
First I need to add the subtotal and the shipcost amount together. So in
this case the subtotal is 50.00 and someone selects option2 with a shipcost
of 20.00 so that would make 70.
Then I need to figure out tax on that new subtotal. Tax is 8.35% (.0835).
Finally I need to display it all like so:
Subtotal: $50.00
Shipping: $20.00 (in the case someone picked option 2 above)
Tax: $5.85 (rounded off to 2 decimal places)
Total: $72.85
Can someone help me with this? I've been fiddling with some stuff I found
on directdrive.com and other places but not getting any joy yet. Thanks
very much.