HTML support for the module Bank transfer
Add HTML support for the module Bank Transfer
Creation, development, manufacturing sites | WEB-STYDIA.COM

And so, as you already understood from the title today, we'll talk as much as possible for the "Bank Transfer" payment module that comes in the standard opencart assembly to add your own text with HTML formatting support.

In this manual, we will attach the ckeditor editor to the translation instruction form, add the html display in the customer order history, in the order history for the administrator, and also send the html code to the client's mail when ordering.

In order to accomplish our task, we need to change only 5 files, namely:

Well, let's get started, to make it possible to add HTML code for the payment module Bank transfer.

1. Open the file: catalog/controller/payment/bank_transfer.php

We are looking for a line:

And replace it with the following code:

2. Open the file: catalog/controller/account/order.php

We are looking for a line with the code:

And replace it with:

Further we find the line:

And we change it to:

3. Open the file: admin/controller/sale/order.php

Find the string:

And replace with:

Further we search for the code:

And change it to the following code:

Then again look for the line with the code:

And replace it with:

4. Open the file: catalog/model/checkout/order.php

Find the string:

And change it to:

Well, that's all, now you can add instructions to the module with support for html.

But for your convenience, we'll add the HTML editor for the module as well, so that you can quickly and easily edit the text.

5. Open the file: admin/view/template/payment/bank_transfer.tpl

In this file we will connect our editor ckeditor.

And so, go to the very end of the file and before:

Add a few lines of code:

Further in the file we search for a line with the form of input of the instruction:

And replace it with:

That is, in this line we added id="description1" to the ckeditor editor.

Well, in principle, all you had to do was make the payment module "Bank Transfer" work with HTML code support ...

All the above actions were carried out on opencart version but this instruction will work on all versions of this branch ...

For the second version of Opencart, everything is basically the same except for a few moments that depend on the specific version of Opencart, the very path of the file placement is a bit different code and so on ...

You may also like

No Comment

You can post first response comment.

Leave A Comment

Please enter your name. Please enter an valid email address. Please enter a message.