Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Little help with ASP, please
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

sji2671
Junior Member

United Kingdom
185 Posts

Posted - 28 March 2002 :  18:01:58  Show Profile  Visit sji2671's Homepage
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
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 28 March 2002 :  18:10:33  Show Profile
What happens if you multiply by 1?

Nikkol
Go to Top of Page

sji2671
Junior Member

United Kingdom
185 Posts

Posted - 28 March 2002 :  18:11:15  Show Profile  Visit sji2671's Homepage
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




Go to Top of Page

sji2671
Junior Member

United Kingdom
185 Posts

Posted - 28 March 2002 :  18:13:29  Show Profile  Visit sji2671's Homepage
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
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 28 March 2002 :  18:15:53  Show Profile
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
Go to Top of Page

sji2671
Junior Member

United Kingdom
185 Posts

Posted - 28 March 2002 :  18:17:47  Show Profile  Visit sji2671's Homepage
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
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 28 March 2002 :  18:21:18  Show Profile
for example, put a line right before dim amt in the code you posted:

response.write(request.form("total"))

Nikkol
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 28 March 2002 :  18:35:39  Show Profile
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
Go to Top of Page

sji2671
Junior Member

United Kingdom
185 Posts

Posted - 28 March 2002 :  18:36:50  Show Profile  Visit sji2671's Homepage
with write.response £5.44 in shopping cart written on screen is 5.44

In my text box showing the caculation is 816




Go to Top of Page

sji2671
Junior Member

United Kingdom
185 Posts

Posted - 28 March 2002 :  18:50:35  Show Profile  Visit sji2671's Homepage
<input type="text" name="total" size="10" VALUE="<%= CDbl(Request.form("total")) %>">

gives £5 as $5

Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 28 March 2002 :  18:55:42  Show Profile
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
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 28 March 2002 :  19:00:55  Show Profile
Here's one more thought:
<input type="text" name="total" size="10" VALUE="<%= CDbl(CDbl(Request.form("total")) * 1.5) %>">

Nikkol
Go to Top of Page

sji2671
Junior Member

United Kingdom
185 Posts

Posted - 28 March 2002 :  19:51:59  Show Profile  Visit sji2671's Homepage
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

Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.19 seconds. Powered By: Snitz Forums 2000 Version 3.4.07