Need Help with HTML Code

Tangerois
Contributor
Contributor

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!



html code.png

 

html code2.png

 

Login to Me Too
2 REPLIES 2

sharpiemarker
Esteemed Advisor
Esteemed Advisor

@Tangerois 

 

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. 🙂
Login to Me Too

Tangerois
Contributor
Contributor
Thank you sharpiemarker for your prompt reply.
Unfortunately whenever I try to replace target="paypal" by target="_self" the button stop working; when I try to click on it the button shows as the picture below.
 
button.png
Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.