Post by opensource » Mon Mar 22, 2021 2:11 pm

Hello,

I would like to redirect a buyer to a custom URL page after the order is submitted. That should happen only for a certain order payment id/name. The custom page should appear instead of a default success page. Can anybody tell me how to achieve this?

Default OpenCart v2.3.0.2

Newbie

Posts

Joined
Wed Dec 23, 2020 5:44 am
Location - Lithuania

Post by Cue4cheap » Mon Mar 22, 2021 10:48 pm

opensource wrote:
Mon Mar 22, 2021 2:11 pm
Hello,

I would like to redirect a buyer to a custom URL page after the order is submitted. That should happen only for a certain order payment id/name. The custom page should appear instead of a default success page. Can anybody tell me how to achieve this?

Default OpenCart v2.3.0.2
There are variables you may not be spelling out.. i.e. is this for only when that payment method is used or is there some other sort of combination? i.e. When they use this payment method and have a first name of "mike" :crazy:
Much easier to give a better response if we knew what payment module you are talking about... BUT
If you are using one of the standard payment modules look in the controller file for that payment module and find the line that has something like:

Code: Select all

$this->response->redirect($this->url->link('checkout/success', '', true));
or

Code: Select all

$json['success'] = $this->url->link('checkout/success');
And change it to your other success page (of course assuming you will be building another success page).

Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by opensource » Tue Mar 23, 2021 4:56 am

That's kinda what I was asking for. I appreciate your quick response, Mike 8)

Newbie

Posts

Joined
Wed Dec 23, 2020 5:44 am
Location - Lithuania
Who is online

Users browsing this forum: No registered users and 29 guests