Post by rat9112 » Thu Nov 12, 2015 10:26 pm

Hi,

I am using bank transfer at the checkout. (OC 1.5+) and I would like to show a message like :

"Please transfer $48 to bank account 123456. "

But What varriable do I need to display the total amount ($48) the customer should pay me?

I know the amount is also show in the order checkout (sttep6) , but I think is would be nicer for the customer to display the total amount again for clearity reasons.

I know PHP , but this OOP stuff opencart is build on is a little out of my leage.

Thanks a lot for helping!

Newbie

Posts

Joined
Thu Nov 12, 2015 10:14 pm

Post by artcore » Fri Nov 13, 2015 12:01 am

Good idea!

Open catalog/controller/payment/bank_transfer.php and find the part that starts with $this->data['bank']...

Replace with:

Code: Select all

$this->data['bank'] = nl2br(str_replace('{total}',$this->currency->format(max(0, $this->cart->getTotal())),$this->config->get('bank_transfer_bank_' . $this->config->get('config_language_id'))));
In admin open up the bank transfer module and change your text to include the {total} at a strategic spot.
Something like:

Pay {total} immediately to:
Bankaccount number...
Thank you!

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by algis789 » Sat Nov 28, 2020 10:53 pm

artcore wrote:
Fri Nov 13, 2015 12:01 am
Good idea!

Open catalog/controller/payment/bank_transfer.php and find the part that starts with $this->data['bank']...

Replace with:

Code: Select all

$this->data['bank'] = nl2br(str_replace('{total}',$this->currency->format(max(0, $this->cart->getTotal())),$this->config->get('bank_transfer_bank_' . $this->config->get('config_language_id'))));
In admin open up the bank transfer module and change your text to include the {total} at a strategic spot.
Something like:

Pay {total} immediately to:
Bankaccount number...
Thank you!
This method doesn't work, maybe you have more ideas? OC 3.0.3.6?

New member

Posts

Joined
Wed Oct 14, 2020 10:15 pm

Post by straightlight » Sun Nov 29, 2020 1:49 am

algis789 wrote:
Sat Nov 28, 2020 10:53 pm
artcore wrote:
Fri Nov 13, 2015 12:01 am
Good idea!

Open catalog/controller/payment/bank_transfer.php and find the part that starts with $this->data['bank']...

Replace with:

Code: Select all

$this->data['bank'] = nl2br(str_replace('{total}',$this->currency->format(max(0, $this->cart->getTotal())),$this->config->get('bank_transfer_bank_' . $this->config->get('config_language_id'))));
In admin open up the bank transfer module and change your text to include the {total} at a strategic spot.
Something like:

Duplicated request: viewtopic.php?f=202&t=221216 .
Bankaccount number...
Thank you!
This method doesn't work, maybe you have more ideas? OC 3.0.3.6?
Duplicated request: viewtopic.php?f=202&t=221216 .

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 40 guests