Questions about Payment Form extension

Redirect successful payment to new page?

  • enoch
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
9 years 3 weeks ago #58923 by enoch
Hi,
I need to track successful payments that are done in payment form using Google Analytics tracking code on a destination page.
Is it possible for Payment form to direct users to a specific page once the payment is completed - instead of just showing a thank you message?

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
9 years 3 weeks ago #58954 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Redirect successful payment to new page?
Hi

It is not possible by default. However, you can edit the code abit to make it works like that:

1. Open the file components/com_pmform/view/complete/html.php

2. Look at function display()

3. Add the line of code below at the beginning of the function
Code:
JFactory::getApplication()->redirect('http://domain.com/your-page.html');

Of course you need to replace domain.com/your-page.html with the URL of the page you want

After that, it should work as expected

Tuan

Please Log in or Create an account to join the conversation.

  • enoch
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
9 years 3 weeks ago #58994 by enoch
Replied by enoch on topic Redirect successful payment to new page?
Bingo - thanks again!

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
9 years 3 weeks ago #59011 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Redirect successful payment to new page?
Happy to assist :).

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc