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

Newbie

Posts

Joined
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:

Error:

Code: Select all

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

Code: Select all

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

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Users browsing this forum: No registered users and 35 guests