Buy Now Button - always works 2nd time, but never the 1st?

Bengal1
Contributor
Contributor

Hello! 

 

I'm new to this, so forgive me any naivety! I have just set up a Buy Now button for my webpage, I will be doing the same one in different currencies.

 

It has 4 different options and prices which I've set up in the Customise Button area. 

 

My problem is that when I test the button (the webpage is not yet live) when you first choose an option and then click "Buy Now", it just reloads my webpage but then when you press it a 2nd time, it works! I have tried this several times on a blank page and on the proper page and it's the same every single time - I don't understand why it ALWAYS works the 2nd time, but not the first? The other issue is that the most expensive option is at the top (which I want), and if you choose, for example, the cheapest option, when it reloads the page, it of course defaults back to the most expensive option, so it might look to the customer that you are trying to dupe them if they click Buy Now again and it works, but on a more expensive option if they've not noticed that it has defaulted back. 

 

Please can anyone help? Here is the code if it's useful:

 

<form action="https://www.paypal.com" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="ZEGXP28GP7PNG">
<table>
<tr><td><input type="hidden" name="on0" value="Package Options">Package Options</td></tr><tr><td><select name="os0">
<option value="PREMIUM, 12 months">PREMIUM, 12 months €60.00 EUR</option>
<option value="PREMIUM, 6 months">PREMIUM, 6 months €35.00 EUR</option>
<option value="STANDARD, 12 months">STANDARD, 12 months €45.00 EUR</option>
<option value="STANDARD, 6 months">STANDARD, 6 months €25.00 EUR</option>
</select> </td></tr>
</table>
<input type="hidden" name="currency_code" value="EUR">

</form>

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

snowshoe
Frequent Advisor
Frequent Advisor

Great, please mark your post as solved, else someone will tag a question totally unrelated to your question.

 

Smiley Happy

View solution in original post

Login to Me Too
4 REPLIES 4

snowshoe
Frequent Advisor
Frequent Advisor

The code by itself inserted into a blank HTML page works fine.  Your issue is probably more to do with your web page design but, without actually seeing what is going on, I can only guess.  You could have a nested form issue or maybe you're working with Frames, don't know. 

 

As for the order of your price selections, all you have to do reverse the order in the code.  You will see in the example below.  I tweeked the first line to include target=paypal just in case you're using Frames, it should be there anyway.  I also reversed the selection order.  And last, I added the button graphic as it was not included in your post. Note, the button graphic has a US link, yours would be a UK link however, it does the job.

 

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <title></title>
    
    
</head>
<body>

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="ZEGXP28GP7PNG">
<table>
<tr><td><input type="hidden" name="on0" value="Package Options">Package Options</td></tr><tr><td><select name="os0">
<option value="STANDARD, 6 months">STANDARD, 6 months €25.00 EUR</option>
<option value="STANDARD, 12 months">STANDARD, 12 months €45.00 EUR</option>
<option value="PREMIUM, 6 months">PREMIUM, 6 months €35.00 EUR</option>
<option value="PREMIUM, 12 months">PREMIUM, 12 months €60.00 EUR</option>
</select> </td></tr>
</table>
<input type="hidden" name="currency_code" value="EUR">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form> 
  
  
  
  </body>
</html>

 

 

Login to Me Too

Bengal1
Contributor
Contributor

Thanks for your help! My website is hosted by Wordpress with a template that I designed on Artisteer if that makes a difference? I guess I should have said that 🙂

 

I'm happy with the order the options are in, it's just if someone clicks the cheapest, being as the button doesn't work first time, when it reloads my web page, it defaults back to the most expensive option which could look like I'm trying to do something underhand - if the button worked the first time, this wouldn't be an issue.

 

I only included the bit of the code I thought was relevant on my post, so the button graphic was there on my webpage, I'm sorry if this caused confusion.

 

I've copied and pasted your code into a blank page on my website and I still get the same problem. Is there anything else I can try?

Login to Me Too

Bengal1
Contributor
Contributor

Thanks again for helping, you made me have a think and I did a search on this excellent forum for "Wordpress" and I think I've found my answer now, I was using the wrong code, silly me 🙂

Login to Me Too
Solved

snowshoe
Frequent Advisor
Frequent Advisor

Great, please mark your post as solved, else someone will tag a question totally unrelated to your question.

 

Smiley Happy

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.