Jump to content
  • 0

Open Payment Gateway In New Window


century1stop

Question

12 answers to this question

Recommended Posts

  • 0

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.

Link to comment
Share on other sites

  • 0

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")
);
Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

  • 0

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?

Link to comment
Share on other sites

  • 0

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'));
Link to comment
Share on other sites

  • 0

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'));
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...