century1stop Posted May 19, 2016 Report Share Posted May 19, 2016 Good day, Is it possible to open a new window when payment button is activated? something like adding target="_blank" with ahref. If possible, may I know where this can be done? Thank you. Quote Link to comment Share on other sites More sharing options...
0 serge Posted May 19, 2016 Report Share Posted May 19, 2016 I think your question is a dev related question for create a gateway Blesta module/plugin. what is the given payment gateway you are working on? Quote Link to comment Share on other sites More sharing options...
0 century1stop Posted May 19, 2016 Author Report Share Posted May 19, 2016 oh no, definitely not good enough to develop, just trying to modify the standard PayPal gateway Quote Link to comment Share on other sites More sharing options...
0 serge Posted May 19, 2016 Report Share Posted May 19, 2016 since paypal way of working is ever redirection to paypal website, so what do you want to accomplish, can you explain? Ok, I got it, you wanted open new window for paypal while keeping the blesta one, I think it's bad idea, it's not common natural flow shopper would like. Quote Link to comment Share on other sites More sharing options...
0 century1stop Posted May 19, 2016 Author Report Share Posted May 19, 2016 I see, but there are quite a no. of sites that do it Thanks Quote Link to comment Share on other sites More sharing options...
0 Blesta Addons Posted May 20, 2016 Report Share Posted May 20, 2016 Just edit the process.pdt file inside the view directory . Quote Link to comment Share on other sites More sharing options...
0 century1stop Posted May 20, 2016 Author Report Share Posted May 20, 2016 Thank you, found it. Sorry but how do I go bout it? Looks to me like it's part of another process only Just edit the process.pdt file inside the view directory . Quote Link to comment Share on other sites More sharing options...
0 Blesta Addons Posted May 21, 2016 Report Share Posted May 21, 2016 Thank you, found it. Sorry but how do I go bout it? Looks to me like it's part of another process only something like this con do the job $this->Form->fieldImage("submit", $this->_("PaypalPaymentsStandard.buildprocess.submit", true), array('src' => $button_url,'target' => "_blank") ); Quote Link to comment Share on other sites More sharing options...
0 century1stop Posted May 23, 2016 Author Report Share Posted May 23, 2016 thanks but it stays on the page below breaks the code $this->Form->fieldImage("submit", $this->_("PaypalPaymentsStandard.buildprocess.submit", true),array('src' => $button_url), ('target' => "_blank")); something like this con do the job $this->Form->fieldImage("submit", $this->_("PaypalPaymentsStandard.buildprocess.submit", true), array('src' => $button_url,'target' => "_blank") ); Quote Link to comment Share on other sites More sharing options...
0 Tyson Posted May 23, 2016 Report Share Posted May 23, 2016 thanks but it stays on the page below breaks the code $this->Form->fieldImage("submit", $this->_("PaypalPaymentsStandard.buildprocess.submit", true), array('src' => $button_url), ('target' => "_blank") ); Your syntax is invalid. You have extra parentheses after $button_url and before 'target'. Try removing those. Michael 1 Quote Link to comment Share on other sites More sharing options...
0 century1stop Posted May 24, 2016 Author Report Share Posted May 24, 2016 thanks but I've done this too $this->Form->fieldImage("submit", $this->_("PaypalPaymentsStandard.buildprocess.submit", true), array('src' => $button_url, 'target' => "_blank") ); and it stays on the page Your syntax is invalid. You have extra parentheses after $button_url and before 'target'. Try removing those. EDIT: Correct me if I'm wrong but this seems to be the image ref <img src="paypal_image" alt="pay with paypal"> so if say the code <img src="paypal_image" alt="pay with paypal" onclick="new.window('$post_to')">, is run, new window will open with a wrong reference. At the same time, original window will go to correct paypal_url as defined in $post_to In other words, the line ==> array('src' => $button_url, with 'target' => "_blank") will not do anything So if I want a new window during the POST operation, it'll have to be at the point where "FORM" is submitted. May I know which section the target attribute can be included? Quote Link to comment Share on other sites More sharing options...
0 Tyson Posted May 24, 2016 Report Share Posted May 24, 2016 I just noticed that naja7host's example of attaching the target to Form::fieldImage is not where you would want to place it. As you've mentioned, a POST request occurs, and any target attributes on links will not have the desired effect. You want to set the target on the form itself: $this->Form->create($post_to, array('target' => '_blank')); Michael 1 Quote Link to comment Share on other sites More sharing options...
0 century1stop Posted May 24, 2016 Author Report Share Posted May 24, 2016 thanks, worked like a charm I just noticed that naja7host's example of attaching the target to Form::fieldImage is not where you would want to place it. As you've mentioned, a POST request occurs, and any target attributes on links will not have the desired effect. You want to set the target on the form itself: $this->Form->create($post_to, array('target' => '_blank')); Quote Link to comment Share on other sites More sharing options...
Question
century1stop
Good day,
Is it possible to open a new window when payment button is activated? something like adding target="_blank" with ahref. If possible, may I know where this can be done?
Thank you.
Link to comment
Share on other sites
12 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.