2

I have paypal "add to cart" buttons set-up throughout my site and a "view cart" button at the top of every page.

The code for the view cart button is:

  <form target='paypal' action='https://www.paypal.com/cgi-bin/webscr' method='post'>
  <input type='hidden' class='displaynone' name='cmd' value='_cart' />
  <input type='hidden' class='displaynone' name='business' value='XXXXXXX123' />
  <input type='hidden' class='displaynone' name='display' value='1' />
  <input type='submit' class='paypalcart' value='View Cart' />
  </form>

Currently, clicking "view cart" opens up a new browser tab and displays the items added on a paypal website.

Instead, I'd like clicking the "view cart" button to take the user to my page www.example.com/cart and then have the contents of the paypal cart displayed on that page in a <div> or <iframe> (or something else).

Any suggestions?

Thanks very much.

2 Answers2

1

You need to build a custom cart into your website instead of using the PayPal cart. There are a number of ways to do this. Are you using WordPress, by chance? If so, I'd recommend installing WooCommerce, and then the PayPal for WooCommerce plugin.

If you're using some other type of framework you may be able to find a nice shopping cart solution for it. Otherwise, you'd just have to build it yourself.

Then you can either use the cart upload method to send cart details to PayPal for checkout, or you could go with the Express Checkout (which I would recommend) if you're familiar with web service API's.

Drew Angell
  • 25,968
  • 5
  • 32
  • 51
0

You can use Minicart Js. Source which really dont suit your requirement, but it does'nt redirect to paypal site when you click "Add to Cart" instead opens lightbox inside your own website eventually when you click "Checkout" it takes you to paypal checkout page. Sample Demo

Vimalnath
  • 6,373
  • 2
  • 26
  • 47
  • Minicart Js turned out to be a near-perfect solution. The only negative was I couldn't get it to carry the "weight" field to paypal to use in shipping calculations, but that turned out not be a big deal. I also found a paid cart solution for $30 that acts very similarly called vibracart. It works with the shipping weight, but I find the Minicart JS to be a cleaner and smoother solution. I strongly recommend Minicart JS for anyone who uses Paypal Payment Standard add to cart buttons...it adds a much smoother and streamline user experience. – user3597113 Jun 05 '14 at 10:26