I want to open a new window after clicking a button and I'm trying to modify the code within Zencart. I think I'm trying to manipulate it in the right place... but I don't know how to go about it:
(For anyone that does know Zencart this was in the paypalwpp.php file, lines 1616-1618)
// This is where we actually redirect the customer's browser to PayPal. Upon return from PayPal, they go to ec_step2
header("HTTP/1.1 302 Object Moved");
zen_redirect($paypal_url . "?cmd=_express-checkout&token=" . $_SESSION['paypal_ec_token'] . $userActionKey);
Here was my amateur attempt:
zen_redirect( "target='_blank'" . $paypal_url . "?cmd=_express-checkout&token=" . $_SESSION['paypal_ec_token'] . $userActionKey);
Of course, I added the "target='_blank'" and it isn't working... how could I go about opening a new window by modifying the above code? Thank You!
More than likely zen_redirect works like a normal redirect. What I mean is that you would not be able to specify the "target" parameter when doing a redirect.
The "target" parameter is a browser based attribute.
Redirects are server side, for the most part.
I think you are looking for something else, but I am not familiar with zen cart.