How to get Paypal cart to load into a lightbox - html

I just putting finishing touches to my website and everytime the links to add to cart are clicked it takes the users to the paypal cart . Is there anyway to load this paypal cart page into a lightbox. Or inside a frame? Becuase all my internal links are loaded with ajax into an appointed Div. So the paypal cart returns the users to the homepage instead of the section where they are making the purchase from. i would like to give my users the full customer experience and keep them engaged on my website

You can use Minicart
<!DOCTYPE html>
<html>
<head>
<meta charset=”utf-8″ />
<title></title>
</head>
<body>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<fieldset>
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="add" value="1″ />
<input type="hidden" name="business" value="example#minicartjs.com" />
<input type="hidden" name="item_name" value="Test Product" />
<input type="hidden" name="quantity" value="1″ />
<input type="hidden" name="amount" value="1.00″ />
<input type="hidden" name="currency_code" value="USD" />
<input class="discount_val" type="hidden" name="discount_amount_cart" value="">
<strong>Test Product</strong>
<input type="submit" name="submit" value="Add to cart" />
</fieldset>
</form>
<script src="minicart.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
paypal.minicart.render();
</script>
</body>
</html>
I have added a complete example here

Minicart will show only the cart page that has the PayPal checkout button. But once you click on that button, you will get redirected to PayPal to complete the payment flow. Are you looking for a solution where the user stays on your site and the entire cart + payment experience runs off of a lightbox? If so, look at "Digital Goods for Express Checkout" (https://developer.paypal.com/docs/classic/express-checkout/digital-goods/IntroducingExpressCheckoutDG/). But keep in mind this should be only used for digital goods (such as downloads, etc.). Hope this helps.

Related

How do I add shipping values per item?

I am using Joomla for my website which has some items for sale. I have hard coded the paypal buttons and costs for this and it works well:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="paypal">
<input alt="Add this item to your order" name="submit" src="/add-to-order.gif" type="image" />
<input name="add" type="hidden" value="1" />
<input name="cmd" type="hidden" value="_cart" />
<input name="business" type="hidden" value="name#name.co.uk" />
<input name="item_name" type="hidden" value="Item name" />
<input name="amount" type="hidden" value="500.00" />
<input name="no_shipping" type="hidden" value="2" />
<input name="currency_code" type="hidden" value="GBP" />
<input name="bn" type="hidden" value="PP-ShopCartBF" />
</form>
However, I wanted to add shipping values per item. These will be different depending on region of delivery and item. Is this all handled in the back end paypal set up? Or do I need to pass in these values? Any advice would be great thanks as im unsure of how to proceed.
For that PayPal integration, which is very old (about 20 years), the variables available for shipping and everything else are all documented here. The cart upload command specifically is explained here.
A current PayPal Checkout is much different.

I need to remove a donate image which works like button and lands a user to official paypal payment website

Paypal has an option to generate donate button if u go to this link generate donation button by entering data asked by paypal
the image used by paypal is ugly and becomes blur when zoomed so I decided to change the the image but when I tried changing the image to actual button using tags the link did not work. I also tried changing type=image to type=button still my problem was not resolved. this is how it looks enter image description here
the html code is
<div class="donate">
<form action="https://www.paypal.com/donate" method="post" target="_top">
<input type="hidden" name="cmd" value="_donations" />
<input type="hidden" name="business" value="prabcrist#gmail.com" />
<input type="hidden" name="item_name" value="Server cost and keeping site live" />
<input type="hidden" name="currency_code" value="USD" />
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" name="submit" title="safer way to apy online" alt="Donate with PayPal button" />
</form>
</div>
the html I used
<div class="donate">
<form action="https://www.paypal.com/donate" method="post" target="_top">
<input type="hidden" name="cmd" value="_donations" />
<input type="hidden" name="business" value="prabcrist#gmail.com" />
<input type="hidden" name="item_name" value="Server cost and keeping site live" />
<input type="hidden" name="currency_code" value="USD" />
<input type="button" value="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" name="submit" title="safer way to apy online" alt="Donate with PayPal button" />
</form>
</div>
</li>
Remove the image 'src' attribute if you want it to be a regular, non-image button. However, it won't look very good unless your page has CSS styling.
Maybe find a different image you like better.

Is there a way to not have a from tag create a tab?

I am making a simple website with a shopping cart and I am using the Paypal "add to cart" button code:
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr"
method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="kin#kinskards.com">
<!-- Specify a PayPal Shopping Cart Add to Cart button. -->
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="add" value="1">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="Birthday - Cake and Candle">
<input type="hidden" name="amount" value="3.95">
<input type="hidden" name="currency_code" value="USD">
<!-- Display the payment button. -->
<input type="image" name="submit"
src="https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_addtocart_120x26.png"
alt="Add to Cart">
<img alt="" width="1" height="1"
src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif">
</form>
I also have a shopping cart logo on the upper right corner and I only want the cart to be accessible through clicking the logo. Is there any way to have the form send the data to the paypal shopping cart but not open the shopping cart tab/window?
Change target=paypal to target="_self" : https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/html_example_cart/#open-shopping-cart-in-the-merchant-window

Is it possible to specify the PayPal fixed donation amount in the querystring parameters?

Let's suppose we have an <input> element where the user can enter a number (e.g. 500).
When clicking some button or so, I want the user to be redirected to the PayPal donation page where they can specify the ammount but to have the default value set to the number set in the input (500 in this case).
Does the PayPal url allows such an option (maybe via querystring parameters)?
Yes it is possible. You will need to create an open source Donation Button in order to have your donors add the donation amount from the form you create rather than on the PayPal Hosted page.
You need to add this to your donation button code
<input type="text" name="amount" size=10><br /><br />
Below is the complete Donation Button Sample code.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_donations">
<!-- Update to Your PayPal Email or Merchant ID -->
<input type="hidden" name="business" value="youremail#email.com">
<input type="hidden" name="lc" value="US">
<!-- Update the Value to the Donation Name -->
<input type="hidden" name="item_name" value="Test Donations"><p>Please Enter an Amount</p>
<!-- The below will allow your customers to enter an amount and this gets passed to PayPal -->
<input type="text" name="amount" size=10><br /><br />
<!-- The rest is the normal PayPal Donation button Info -->
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="cn" value="Add special instructions to the seller:">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHosted">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_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>
Creating Donation Buttons

DHL Tracking HTML Form?

Does anyone know if I can create an HTML Form to search the DHL tracking website?
http://www.dhl.co.uk/en/express/tracking.html
I have tried using the following but get the error 'down for maintenance':
<!DOCTYPE html>
<!--[if IE]>
<![endif]-->
<html><head><meta charset="utf-8" />
</head>
<body>
<form action="http://www.dhl.co.uk/content/gb/en/express/tracking.shtml?brand=DHL&AWB=1212121212" method="post">
<input type="submit" value="go" />
</form>
</body>
</html>
Will I have to use the API?
The following HTML tracking sample enables you to insert a single waybill number into a tracking field and submit the request via your existing web page. This link takes you to the DHL tracking screen, automatically populating the shipment information.
<html>
<head>
<title>DHL - Track By Tracking Number</title>
</head>
<body>
<form name="form1" method="get" action="http://www.dhl-usa.com/content/us/en/express/tracking.shtml?">
< input type=hidden name=brand VALUE="DHL">
<input type="text" name="AWB" size="10"><br>
<input type="submit" value="Submit"><br>
<input type="reset" value="Reset">
</body>
</html>
Big shout out to #WeezHard for dropping that form. I figured his solution is directed at DHL USA, so if you want a global DHL tracking form you can use the follow code.
<form name="form1" method="get" action="https://www.dhl.com/global-en/home/tracking/tracking-express.html?submit=1&tracking-id=" target="_blank">
<input type=hidden name=submit VALUE="1">
<input type="text" name="tracking-id" size="10" placeholder="Enter your DHL waybill number here..."><br>
<input type="submit" value="Track">
</form>
I modified #WeezHard codes to adapt Aramex courier tracking
<form name="form1" method="get" action="https://www.aramex.com/track/results?
ShipmentNumber=" target="_blank">
<input type="text" name="ShipmentNumber" size="11" placeholder="Enter your AWB"><br>
<input type="submit" value="Track">
<input type="reset" value="Reset">
</form>
feel free to use it! ;)