Need Help with HTML Code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Paypal Commmunity,
I have Paypal (Add to cart) button on my website BUT when I click on it, it opens in another tab.
I would like to make this button to be opened in the same page (tab).
Below is the button's picture as well as the code, please tell me what shall I modify, Thanks!
- Labels:
-
PayPal HTML Buttons
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you're NOT using a hosted or encrypted button, replace target="PayPal" in the first line of button code with target="_self".
Then add this line to your Add to Cart and View Cart button code to take the buyer back to your shop when they click "Continue Shopping" button:
<input type="hidden" name="shopping_url" value="YOUR_SHOP_URL_HERE">
If using hosted or encrypted buttons, in Step 3 of in the button making process, in the Advanced Variables field, add this line exactly (using url to your shop after the equal sign, of course):
shopping_url=YOUR_SHOP_URL_HERE
After exporting your button modify the form tag line (the first line of the code) the same way as above.
Hope this works.
Kudos & Solved are greatly appreciated. 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Which api can get oauth2.0 authorization_code? in REST APIs
- [WooCommerce PayPal Payments] - Required phone country code, different than the cards country code. in PayPal Payments Standard
- Something went wrong. Contact the merchant for help. in PayPal Payments Standard
- Problem with invoices in REST APIs
- p is not a function error using the example downloaded from Paypal in SDKs