Post by sheri777 » Mon Jul 09, 2018 7:54 pm

Under My Payment Controller
I want to redirect user to Checkout Page with Alert Error/warning message layer at top of the Page.

I know how to redirect but dont know how can i display success or error



Fri Jun 29, 2018 7:56 pm

Post by straightlight » Mon Jul 09, 2018 10:22 pm

By default, OC does not have a top-page header alert, only objects inside pages. However, if you are using a custom theme, that may be possible. In order to declare your alerts from your catalog/controller/checkout/payment_method.php file, you can rely on the use of session super global:


Code: Select all

$this->session->data['error'] = 'My error message!';

Code: Select all

$this->session->data['success'] = 'My success message!';

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Legendary Member


Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 84 guests