Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Archived

This topic is now archived and is closed to further replies.

kieran_mullen

Adding a paypal button to my product page just to skip store

Recommended Posts

OK I asked this question a long time ago but it never got answered. Well I did not supply all the info.

 

Info: I mainly do not sell small items less than $12. I would like to use a simple paypal button in the description with a fix item and price. I have made the button through paypal but when I click buy now and expecting it to go to paypal, it goes the shopping cart of the store.

Share this post


Link to post
Share on other sites

Are you leaving the current cart intact, and letting customers use it to buy multiple items if they want to? Just adding a "Buy it Now" button for single item purchase convenience? If so, I would consider a button to all-in-one add the item to the cart and go directly to the checkout process, rather than going through PayPal purchasing (with its own ideas about shipping and taxes). I don't think there are any add-ons to do this, but I could be wrong. Are you disabling and removing the built-in cart and checkout process, and only using osC as a catalog (with search)? I think there is an add-on to do that ("catalog only"). I would be one very annoyed customer if I wanted to buy several items and found myself forced to go through a complete PayPal checkout and payment cycle for each, but hey, it's your store.

Share this post


Link to post
Share on other sites

I am only using it for a $5 item which is going to a micropayments account and shipping is included.

 

This is the page just for testing... (I am adding the paypal code through the item description)

http://www.testingforms.com/store/question-scantron-compatible-forms-pack-free-shipping-p-64.html

 

<form action="https://www.paypal.com/cgi-bin/webscr" method="post"
target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="4FSQ9M9G7A43E">
<table>
<tr><td><input type="hidden" name="on0" value="Package Size">Package
Size</td></tr><tr><td><select name="os0">
<option value="25 Pack">25 Pack $5.50 USD</option>
<option value="50 Pack">50 Pack $9.50 USD</option>
<option value="100 Pack">100 Pack $12.50 USD</option>
</select> </td></tr>
<tr><td><input type="hidden" name="on1" value="Form Type">Form
Type</td></tr><tr><td><select name="os1">
<option value="881 - 50 Question">881 - 50 Question </option>
<option value="889 - 50 Question">889 - 50 Question </option>
<option value="882 - 100 Question">882 - 100 Question </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_buynowCC_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>

Share this post


Link to post
Share on other sites

Agree with burt. Looking at the html of your 'page just for testing' there are 3 forms, which is all right. But one form is inside another, which is not all right.

 

The line numbers are

 

113 <form

 

158 <form

 

176 </form

 

239 </form

 

323 <form </form

Share this post


Link to post
Share on other sites

Chris (aka Mr Steed?) is pointing you to the problem - nested forms - someplace in your product_info.php file there's the lines of code that generate

 

<input type="hidden" name="products_id" value="64">

<input type="image" src="includes/languages/english/images/buttons/button_in_cart.gif" border="0"

alt="Add to Cart" title=" Add to Cart ">

 

You need a </form> moved to immediately after that from wherever the </form> in line 329 is generated in your product_info.php

Share this post


Link to post
Share on other sites

×