Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

display order total in checkout_success.php


john222

Recommended Posts

or better, how do I add the total amount to the description of a paying method (like the wire transfer module):

 

define('MODULE_PAYMENT_TRANSFER_TEXT_TITLE', 'Bank Transfer');

define('MODULE_PAYMENT_TRANSFER_TEXT_DESCRIPTION', 'Please use the following information to make a Bank Tranfer.');?>

 

I want it to say "Please use the following information to transfer the total of $XX.XX" but how do I get the total in there?

 

Thanks

Link to comment
Share on other sites

Edit the following line as :

 

define('MODULE_PAYMENT_TRANSFER_TEXT_DESCRIPTION', 'Please use the following information to make a Bank Tranfer.');

 

define('MODULE_PAYMENT_TRANSFER_TEXT_DESCRIPTION', 'Please use the following information to transfer a total of %s.');

 

Replace the following line in payment file in /catalog/modules/payment:

 

function confirmation() {

      return array('title' => MODULE_PAYMENT_TRANSFER_TEXT_DESCRIPTION);

    }

 

With:

 

function confirmation() {

      return array('title' => sprintf(MODULE_PAYMENT_TRANSFER_TEXT_DESCRIPTION, $order->info['total']));

    }

 

Hope it helps!

Link to comment
Share on other sites

The weird thing is, that if I replace:

 

$this->title = MODULE_PAYMENT_TRANSFER_TEXT_TITLE;

 

with

 

$this->title =sprintf(MODULE_PAYMENT_TRANSFER_TEXT_DESCRIPTION, $order->info['total']);

 

The title will be the payment description WITH the order amount. But this is not what I want of course.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...