Tips and Tricks HQ Support Portal › Forums › Simple PayPal Shopping Cart › WP Cart – PayPal form in new window
Tagged: form action, open new window
- This topic has 15 replies, 5 voices, and was last updated 9 years, 3 months ago by clearscope.
January 21, 2010 at 3:29 pm #677webwitchMember
After hitting the checkout button, I’d like to open the paypal form in a new window if possible.
Thanks for your help.January 22, 2010 at 2:31 am #17397
Just add target=”_blank” property in the form action and it will open it in a new window.January 22, 2010 at 11:08 am #17398webwitchMember
Thank you.March 1, 2010 at 4:21 pm #17399
Exactly where in the form action? Through the plug-in editor or ???March 1, 2010 at 5:00 pm #17400
I tried putting the target=”_blank” in the form action and it didn’t work. Can you put the exact code where the target it supposed to be inserted? Thanks!March 1, 2010 at 11:52 pm #17401
Search for the following line in the “wp_shopping_cart.php” file:
<form action=”https://www.paypal.com/us/cgi-bin/webscr” method=”post”>
Once you find it change that string to the following:
<form action=”https://www.paypal.com/us/cgi-bin/webscr” method=”post” target=”_blank”>March 2, 2010 at 12:06 pm #17402
Ah, okay. I was putting it in the wrong place. Thank you SO much.March 2, 2010 at 12:15 pm #17403
Nope, that didn’t work. I changed it here:
$output .= “<form action=”https://www.paypal.com/us/cgi-bin/webscr” method=”post” target=”_blank”> $form”;March 2, 2010 at 12:20 pm #17404
And now instead of the button showing it shows the raw code like so: [wp_cart:Demystifying Dementia DVD:price:5.95:end]March 2, 2010 at 11:16 pm #17405
Please copy and paste the following line (I have tested this):
$output .= “<form action=”https://www.paypal.com/us/cgi-bin/webscr” method=”post” target=”_blank” >$form”;March 5, 2010 at 3:38 pm #17406
That didn’t work, here is the page [http://seniorcareonline.net/products/products/]
The shopping cart still appears at the bottom and I copied your code into notepad and then into the plug-in editor in WP panel.March 6, 2010 at 2:22 am #17407
There seem to be a bit of communication gap here.
The title of this forum thread is “PayPal form in new window” and the goal is:
“After hitting the checkout button, I’d like to open the paypal form in a new window if possible”
Now if you click on the “Checkout button” from the shopping cart you will see it opens the a new window for the paypal payment. So from my point of view it’s doing what I thought you wanted it do.
But now you just posted:
“The shopping cart still appears at the bottom”
The shopping cart is going to sit where you want it/place it on a page. So my question to you is what are you after?March 6, 2010 at 12:37 pm #17408
I don’t want the shopping cart to appear on the bottom of the page at all, it makes people have to scroll down to see it. When they click add to cart I’d like another tab/window to open.March 6, 2010 at 10:40 pm #17409IvyMember
Hi, Then you need to take the shortcode you are using out of the page or post it should be one of the following:
[wp_eStore_cart] Display the shopping cart on a post or page
[wp_eStore_cart_when_not_empty] Display the shopping cart on a post or page but the
cart is visible only when there are items in the cart
Then you will need to check the “Automatic redirection to checkout page” checkbox in the main settings page of the eStore and specify a check out page URL in the “Checkout Page” field.March 7, 2010 at 12:17 am #17410
All you have to do is use the shortcode that displays the shopping cart at the top of the page… this way when someone adds a product it will be displayed at the top of the page.
If you want the page to open a new window when someone hits the “Add to Cart” button then search for the following in the “wp_shopping_cart.php” file:
$replacement = ‘<object><form method=”post” action=””
once you find the line replace it with the following:
$replacement = ‘<object><form method=”post” action=”” target=”_blank” style=”display:inline” onsubmit=”return ReadForm(this, true);”>’;
- You must be logged in to reply to this topic.