catalog/controller/checkout/success.php
Got a burning question at 3 AM that even Google shrugs at? There’s a not-so-secret inbox that might just have your answer: khnaz35@gmail.com
Breathe in some nature while you're at it. It’s cheaper than therapy.
Feel free to sling a bear my way via PayPal @ khnaz35@gmail.com
Modify catalog/controller/checkout/success.php
Replace.
Code: Select all
$this->response->setOutput($this->load->view('common/success', $data));
Code: Select all
if ($this->customer->isLogged()) {
// If the customer is logged in, go to the order details page
$this->response->redirect($this->url->link('account/order/info', 'order_id=' . $order_id, true));
} else {
// If the customer is not logged in, remain on the same page.
$this->response->setOutput($this->load->view('common/success', $data));
}
Code: Select all
$order_id = $this->session->data['order_id'];
Regards,
Knowband Team
Opencart Plugins: Knowband Store
Email: support@knowband.com
Tried it. Doesn't work correctly.knowband.plugins wrote: ↑Wed Sep 17, 2025 4:19 pmModify catalog/controller/checkout/success.php
Replace.
withCode: Select all
$this->response->setOutput($this->load->view('common/success', $data));
Also, on the top in the index function on the same file, define this.Code: Select all
if ($this->customer->isLogged()) { // If the customer is logged in, go to the order details page $this->response->redirect($this->url->link('account/order/info', 'order_id=' . $order_id, true)); } else { // If the customer is not logged in, remain on the same page. $this->response->setOutput($this->load->view('common/success', $data)); }
Code: Select all
$order_id = $this->session->data['order_id'];
But it says:
The page you requested cannot be found!
The page you requested cannot be found.
And url is like: /?route=account/order/info&order_id=51
Got a burning question at 3 AM that even Google shrugs at? There’s a not-so-secret inbox that might just have your answer: khnaz35@gmail.com
Breathe in some nature while you're at it. It’s cheaper than therapy.
Feel free to sling a bear my way via PayPal @ khnaz35@gmail.com
Anyway, several users have now advised you to use a stable OpenCart release, e.g. 3.0.4.1, instead of OpenCart 4 which is still subject to development and bugfixes.
Or you could post a request on the commercial support section of this forum, to find a developer who can do it as a paid job. The change would probably have to be implemented as an event handler for e.g. the trigger 'view/common/success/after'.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Users browsing this forum: No registered users and 10 guests