Search code examples
paypalshopping-cartpaypal-buttons

View Paypal shopping cart contents on my site


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.


Solution

  • 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