PayPal addon
PermalinkHave you added the link using the regular 'Content' block? Or is it in an autonav block? or what?
Or do you want your part of the payment (the paypal addon) page to stay in your window, but to open PayPal's part of the payment process in a new window?
Thanks for your help.
Copy the file:
packages/paypal_donations_box/blocks/paypal_donations_box/view.php
To:
blocks/paypal_donations_box/templates/donate_new_window.php
Then edit line 10 (the form) to:
<form action="<?php echo $controller->paypal_url?>" method="post" target="_new">
Now when in edit mode, select your PayPal donations block, click 'Custom Template' and select 'Donate New Window'.
Here is a completely different solution. Below your paypal block, create an HTML block and paste exactly the following into it. ANY MORE OR ANY LESS AND YOU RISK BREAKING YOUR SYSTEM IN SUCH A WAY THAT YOU WILL NOT BE ABLE TO RECOVER IT (and I will not be able to help you or accept responsibility).
<script type="text/javascript"> if (CCM_EDIT_MODE){ document.write('<p>SCRIPT TO OPEN PAYPAL IN NEW WINDOW</p>'); }else{ $(document).ready(function(){ $('div.block-paypal-donations').find('form').attr('target','_new'); }); } </script>
(there is probably a better way to do it, but I don't have time to sort it out)
How you get this into the html depends on how you are creating a link. From any block with an html view it is just simply editing the text.