Jump to content

Any way of getting hookPaymentReturn to re-direct to a url?


Recommended Posts

Trying to modify the sagepay.php module so that I can send a user to a url of my choice rather than the default confirmation.tpl:

public function hookPaymentReturn($params)
   {
       if (!$this->active)
           return ;
       return $this->display(__FILE__, 'confirmation.tpl');
   }



Is this an easy modification?

Thanks,
James

Link to comment
Share on other sites

Trying to modify the sagepay.php module so that I can send a user to a url of my choice rather than the default confirmation.tpl:

public function hookPaymentReturn($params)
   {
       if (!$this->active)
           return ;
       return $this->display(__FILE__, 'confirmation.tpl');
   }



Is this an easy modification?

Thanks,
James



Replace:
return $this->display(__FILE__, 'confirmation.tpl');



with this (if you want to redirect to a same domain)

Tools::redirect('index.php');



or (if you want to redirect it to url from another domain)

Tools::redirectLink('http://prestashop.com');

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...