Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hi,

 

I wondered if you can help. I have set up a PayPal ‘Pay Now’ page, which can be found here…

 

http://www.babiesaway.co.uk/pay/

 

The problem I am having is that it works perfectly in browsers EXCEPT FOR Firefox, where you click the button and go to PayPal to make the payment and you get the message, “Please enter an amount greater than zero.” Go ahead and give it a go in Internet Explorer so you see what should happen and then try it in Firefox…

 

This only happens when using Firefox and is obviously a huge problem because customers using Firefox aren’t able to make the orders!

 

If anyone could help, I would be extremely grateful…

 

Here’s my code, if it helps…

 

<head>
<!-- 

function Dollar (val) {      // force to valid dollar amount
var str,pos,rnd=0;
 if (val < .995) rnd = 1;  // for old Netscape browsers
 str = escape (val*1.0 + 0.005001 + rnd);  // float, round, escape
 pos = str.indexOf (".");
 if (pos > 0) str = str.substring (rnd, pos + 3);
 return str;
}

function ReadForm (obj1) {


if(myform.quote_amount.value=="")
{
	window.alert("Please enter the amount quoted for the item!");
	myform.quote_amount.focus();
	return false;
}
if(myform.deposit_amount.value=="")
{
	window.alert("Please enter the deposit quoted for the item!");
	myform.deposit_amount.focus();
	return false;
}

if(!myform.CheckTerms.checked)
{
	window.alert("Please accept the terms and conditions!");
	myform.CheckTerms.focus();
	return false;
}



//calculate the amount
myform.amount.value = Dollar(eval(myform.quote_amount.value)*1 + eval(myform.deposit_amount.value)*1);
myform.on0.value = "Quoted Amount";
myform.os0.value = "£" + myform.quote_amount.value;
myform.on1.value = "Deposit Amount";
myform.os1.value = "£" + myform.deposit_amount.value;

//Add in the where did you hear about us information
myform.os1.value = myform.os1.value + " Where did you hear about us?: " + myform.aboutus.options[myform.aboutus.selectedIndex].value;

}//end of read form
-->
</script>
</head>

 

And in the <body> section…

 

<!-- Start of Form   -->
<FORM METHOD="POST" ACTION="https://www.paypal.co.uk/cgi-bin/webscr" target="_blank"  onsubmit="return ReadForm (this);" name="myform">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="add" value="1">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="amount" value="0">
<input type ="hidden" name=on0 value="">
<input type ="hidden" name=os0 value="">
<input type ="hidden" name=on1 value="">
<input type ="hidden" name=os1 value="">
<div align="center">
 <center>
 <table border="0" cellpadding="2">
 </center>
 <center>
   <tr>
     <td width="100%" align="center" bgcolor="#78B7FC"><font color="#FFFFFF">The
       Item</font></td>
   </tr>
   <tr>
     <td width="100%" align="center">Please tell us
       what you're paying us for:</td>
   </tr>
   <tr>
     <td width="100%" align="center"><select name="item_name" style="background-color: rgb(242,133,131); color: rgb(255,255,255); font: Arial; font-size: 10pt" size="1">
				<option value="Infant Carrier (item number 1)">
                       Infant Carrier
				</option><option value="Forward Facing Car Seat (item number 2)">

Forward Facing Car Seat
				</option><option value="Booster Seat (item number 3)">

Booster Seat
				</option>
         <option value="Sunscreen (item number 4)">Sunscreen</option>
         <option value="Stroller/Pushchair (item number 6)">Stroller/Pushchair</option>
         <option value="Travel System (item number 7)">Travel System</option>
         <option value="3 Wheeler (item number 8)">3 Wheeler</option>
         <option value="Twin (item number 9)">Twin</option>
                   <option value="Mei Tai Baby Carrier (item number 10)">Mei
                   Tai Baby Carrier</option>
                   <option value="Hippy Chick Hip Seat (item number 11)">Hippy
                   Chick Hip Seat</option>
                   <option value="Moby Wrap (item number 12)">Moby Wrap</option>
                   <option value="Ring Sling (item number 13)">Ring Sling</option>
         <option value="High Chair (item number 14)">High Chair</option>
         <option value="Booster Seats (item number 15)">Booster Seats</option>
         <option value="Bumbo Seat (item number 16)">Bumbo Seat</option>
         <option value="Compact Steriliser (item number 17)">Compact Steriliser</option>
         <option value="Lindam Steriliser Bags (item number 18)">Lindam
         Steriliser Bags</option>
         <option value="Moses Basket (item number 19)">Moses Basket</option>
         <option value="Travel Cot (item number 20)">Travel Cot</option>
         <option value="Pop Up Travel Cot (item number 21)">Pop Up Travel Cot</option>
         <option value="Stair Gate (item number 22)">Stair Gate</option>
         <option value="Baby Monitor (item number 23)">Baby Monitor</option>
                   <option value="Bed Guard (item number 24)">Bed Guard</option>
       </select></td>
   </tr>
   <tr>
     <td width="100%" align="center">Please input the price quoted for the item:</td>
   </tr>
   <tr>
     <td width="100%" align="center"><input type="text" name="quote_amount" style="background-color: rgb(242,133,131); color: rgb(255,255,255); font: Arial; font-size: 10pt"></td>
   </tr>
   <tr>
     <td width="100%" align="center">Please input the deposit quoted for the
       item:</td>
   </tr>
   <tr>
     <td width="100%" align="center"><input type="text" name="deposit_amount" style="background-color: rgb(242,133,131); color: rgb(255,255,255); font: Arial; font-size: 10pt">
</td>
   </tr>
   <tr>
     <td width="100%" align="center" bgcolor="#78B7FC"><font color="#FFFFFF">Postage
       & Packing</font></td>
   </tr>
   <tr>
     <td width="100%" align="center">Please input the p&p costs (leave
       blank or enter 0 if your p&p costs are free):</td>
   </tr>
   <tr><!-- Note - 0.00 must be entered if shipping is free -->
     <td width="100%" align="center"><input type="text" name="shipping" style="background-color: rgb(242,133,131); color: rgb(255,255,255); font: Arial; font-size: 10pt">
</td>
   </tr>
   <tr>
     <td width="100%" align="center">Where did you hear about Babies Away?:
</td>
   </tr>
   <tr>
     <td width="100%" align="center">
<select name="aboutus" style="background-color: rgb(242,133,131); color: rgb(255,255,255); font: Arial; font-size: 10pt" size="1">
<option value="No Selection Made" >Please Choose:</option>
<option value="Google">Google</option>
<option value="Yahoo!">Yahoo!</option>
<option value="Other Search Engine">Other Search Engine</option>
<option value="Yell.com">Yell.com</option>
<option value="Netmums.com">Netmums.com</option>
<option value="Word of Mouth">Word of Mouth</option>
<option value="Leaflet">Leaflet</option>
<option value="Poster">Poster</option>
<option value="Advertisement">Advertisement</option>
<option value="Business Card">Business Card</option>
<option value="BEHA">BEHA</option>
<option value="Other">Other</option>
</select>
</td>
   </tr>
   <tr>
     <td width="100%" align="center">
       <hr>
     </td>
   </tr>
   <tr>
     <td width="100%" align="center"> <input type="checkbox" name="CheckTerms">
       I hereby agree to the Babies Away <a href="../terms.htm">terms
       and conditions</a>.</td>
   </tr>
   <tr>
     <td width="100%" align="center">
       <hr>
     </td>
   </tr>
   <tr>
     <td width="100%" align="center">
       <img border="0" src="../images/secure.gif" width="12" height="15"> Please click the button below to be connected to the secure e-commerce server.
     </td>
   </tr>
 </table>
 </center>
</div>
<div align="center">
 <center>
 <table border="0" cellpadding="0" cellspacing="1">
   <tr>
     <td>
<input type="submit" value="Continue to Secure Server"  style="color: #FC6F6A; font-family: Arial; font-size: 13px; cursor: hand" name="Submit"></td>
     <td width="15">
     </td>
     <td>
<input type="reset" value="Reset"  style="color: #FC6F6A; font-family: Arial; font-size: 13px; cursor: hand" name="reset"></td>
   </tr>
 </table>
 </center>
</div>
    </form>
<!-- End of Form -->

Posted

James,

 

 

This forum is for osCommerce support. If you ever decide to install an osCommerce cart, be sure to look us up then.

 

 

Chris

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...