Author |
Topic |
sji2671
Junior Member
United Kingdom
185 Posts |
Posted - 28 March 2002 : 18:01:58
|
Here is the form, after EM_ 's suggestion.
<form name="myform" method="get" action="https://www.2checkout.com/cgi-bin/sbuyers/cartpurchase.2c"> <input type="hidden" name="email" VALUE="<% = Request.form("email") %>"> <input type="hidden" name="zip" VALUE="<% = Request.form("zip") %>"> <input type="hidden" name="street_address" VALUE="<% = Request.form("address") %>"> <input type="hidden" name="cart_order_id" VALUE="<% = Request.form("order_id") %>"> <input type="hidden" name="sid" value="23779"> <input type="hidden" name="country" VALUE="United Kingdom"> <input type="hidden" name="city" VALUE="<% = Request.form("city") %>"> <input type="hidden" name="phone" VALUE="<% = Request.form("phone") %>"> <input type="hidden" name="state" VALUE="Outside Us and Canada"> <p> </p> <p align="center"><u><b><font color="#000080" size="5">Online Order</font></b></u><br> <font color="#000080"> Order Value has been converted into dollars</font></p> <p align="center"><% dim amt amt = CDbl(Request.form("total")) * 1.5 %> <input type="text" name="total" size="10" VALUE="<%=amt%>"> <input type="hidden" name="total" size="10" VALUE="<%=FormatNumber(amt,2)%>"> </p> <p align="center"><font color="#000080">Your credit card company will charge you in pounds sterling.</font></p> <p align="center"><input type="submit" value="Continue to Secure Payment Area"> </p> </form>
This shopping cart/form worked perfectly before with another merchant that went down, the figures calculated in the cart are fine, just getting that final total figure to be multiplied by 1.5 so that the merchant receives the figure as $ and not £
Edited by - sji2671 on 28 March 2002 18:04:27 |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 28 March 2002 : 18:10:33
|
What happens if you multiply by 1?
Nikkol |
|
|
sji2671
Junior Member
United Kingdom
185 Posts |
Posted - 28 March 2002 : 18:11:15
|
If it helps, which it probably wont the above code makes the total go from £5.44 to $81600 which is even worse,lol when it should be $8.16
|
|
|
sji2671
Junior Member
United Kingdom
185 Posts |
Posted - 28 March 2002 : 18:13:29
|
With the code above its $54,000.00 with my old code it is $540
Edited by - sji2671 on 28 March 2002 18:16:29 |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 28 March 2002 : 18:15:53
|
and if you don't multiply by anything? Just do a response.write of the request.form("total") and see what the form is sending you.
Nikkol |
|
|
sji2671
Junior Member
United Kingdom
185 Posts |
Posted - 28 March 2002 : 18:17:47
|
do a response.write ? could you explain how to do that
if I dont multiply by anything £5.00 becomes $5.00
Edited by - sji2671 on 28 March 2002 18:22:41 |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 28 March 2002 : 18:21:18
|
for example, put a line right before dim amt in the code you posted:
response.write(request.form("total"))
Nikkol |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 28 March 2002 : 18:35:39
|
Just want to be sure. If you have this code:
<p align="center"><u><b><font color="#000080" size="5">Online Order</font></b></u><br> <font color="#000080"> Order Value has been converted into dollars</font></p> <p align="center"> <input type="text" name="total" size="10" VALUE="<%= CDbl(Request.form("total")) * 1.5 %>"> </p> <p align="center"><font color="#000080">Your credit card company will charge you in pounds sterling.</font></p> <p align="center"><input type="submit" value="Continue to Secure Payment Area"> </p>
The line in red returns 750 for 5.00 when it should be 7.50, yes?
If you change the red line to: <input type="text" name="total" size="10" VALUE="<%= Request.form("total") %>">
it returns 5.00?
If you change the red line to: <input type="text" name="total" size="10" VALUE="<%= CDbl(Request.form("total")) %>">
what does it return?
Nikkol |
|
|
sji2671
Junior Member
United Kingdom
185 Posts |
Posted - 28 March 2002 : 18:36:50
|
with write.response £5.44 in shopping cart written on screen is 5.44
In my text box showing the caculation is 816
|
|
|
sji2671
Junior Member
United Kingdom
185 Posts |
Posted - 28 March 2002 : 18:50:35
|
<input type="text" name="total" size="10" VALUE="<%= CDbl(Request.form("total")) %>">
gives £5 as $5
|
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 28 March 2002 : 18:55:42
|
I'm at a loss for why it doesn't work...try putting parantheses around stuff.. <input type="text" name="total" size="10" VALUE="<%= (CDbl(Request.form("total")) * 1.5) %>">
Nikkol |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 28 March 2002 : 19:00:55
|
Here's one more thought: <input type="text" name="total" size="10" VALUE="<%= CDbl(CDbl(Request.form("total")) * 1.5) %>">
Nikkol |
|
|
sji2671
Junior Member
United Kingdom
185 Posts |
Posted - 28 March 2002 : 19:51:59
|
tried everything and no joy, however I went back to the page before where the total was made up before order_transfer.asp and changed
totalcost = (totprice+shipping;
totalcost = (totprice+shipping)*1.5;
and it works ! Amen !
No idea why the same didnt work on the next page, but really thanks ! for helping me along the way, I would have just given up by now if I hadn't come here
|
|
|
Topic |
|