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 10 years, 11 months ago by clearscope.
-
AuthorPosts
-
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 #17397amin007ParticipantJust add target=”_blank” property in the form action and it will open it in a new window.
January 22, 2010 at 11:08 am #17398webwitchMemberThank you.
March 1, 2010 at 4:21 pm #17399bostonchicklet8MemberExactly where in the form action? Through the plug-in editor or ???
March 1, 2010 at 5:00 pm #17400bostonchicklet8MemberI 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 #17401amin007ParticipantSearch 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 #17402bostonchicklet8MemberAh, okay. I was putting it in the wrong place. Thank you SO much.
March 2, 2010 at 12:15 pm #17403bostonchicklet8MemberNope, 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 #17404bostonchicklet8MemberAnd 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 #17405amin007ParticipantPlease 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 #17406bostonchicklet8MemberThat 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 #17407amin007ParticipantThere 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 #17408bostonchicklet8MemberI 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 #17409IvyMemberHi, 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 #17410amin007ParticipantAll 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);”>’;
-
AuthorPosts
- You must be logged in to reply to this topic.