Add To Cart button not working

T-Bone56
Contributor
Contributor

I created a PayPal button using the legacy button generator. I created two drop down Add to Cart buttons which both initially worked, but then only 1 button worked and the other button didn't work (screen flashed and brought me back to my website without viewing my cart) and then eventually neither button worked - both had same 'screen flash' and back to website response. Also tried with only 1 button in case 1 of the buttons was conflicting with the other for some reason - same result. I've tried Chrome, IE and Edge with same result. I also made a new button with the same result. I don't know why it was initially working and then gradually degraded to not working at all regardless of the changes I made. 

 

I created a new page with only the PayPal HTML code, and I've cleared my cache, cookies and etc., closed and reopened my browser with same result.

 

Below is the code I am using that results in nothing being added to my cart, any suggestions on what to change / do differently?

 

<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="486TBR1G5LY8Y">

<table>

<tr><td><input type="hidden" name="on0" value="Number of Adults">Number of Adults</td></tr><tr><td><select name="os0">

            <option value="1 Adult">1 Adult $50.00 USD</option>

            <option value="2 Adults">2 Adults $100.00 USD</option>

            <option value="3 Adults">3 Adults $150.00 USD</option>

            <option value="4 Adults">4 Adults $200.00 USD</option>

</select> </td></tr>

</table>

<input type="hidden" name="currency_code" value="USD">

<input type="image" src=https://www.paypalobjects.com/en_US/i/btn/btn_cart_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>

Login to Me Too
1 REPLY 1

orerockon_dvd
Contributor
Contributor

This is exactly (more or less) my issue. ALL of the add to cart buttons on my website stopped working. I was alerted by a shopper that some buttons worked for them, then the next button, and all subsequent buttons they clicked came up with the incredibly unhelpful "Things don't appear to be working at the moment. Please try again later." So I tried the same ones that they did, and they were STILL BROKEN. I tried on my phone and they were ALL BROKEN. I had my wife try on her phone and they ALL WORKED. I went back to my computer and tried again and they ALL WORKED. Then a couple days later another shopper said the same thing, they were ALL BROKEN. I tried, my wife tried, and they were ALL BROKEN. The next morning I tried again and they ALL WORKED. A couple days later I tried again and they were ALL BROKEN. They are still ALL BROKEN. The ONLY way I can get a working button again is to create a new shopping cart button, which gives totally different code than it used to (I haven't created a button in a while so I don't know how or why or when that changed). It shows up as a <form></form> now and my html editor Dreamweaver doesn't like that, so it shows up as broken code. I uploaded the page and the new button WORKED. The old buttons were ALL BROKEN. 

 

For reference the old code that Paypal BROKE was this:

 

<a href="#" onClick="window.open('https://www.paypal.com/cart/add=1&business=dvd%40orerockon.com&item_name=Big+Fat+Obsidian+Needles&am...');"><img src="cart.gif" align="absmiddle"
border="0" height="24" width="37" /></a>

 

The new button that I generated looked like this, which does me no good whatsoever, as I would have to have HUNDREDS of hosted buttons and change them on an almost daily basis since I have hundreds of items and when I sell I take them down and replace them with a new item, which would require a new hosted button. 

 

<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="7X3RZTSJ8FJN4">
<input type="image" src="http://orerockon.com/cart.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>

 

 

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.