Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

display order total in checkout_success.php


john222

Recommended Posts

Posted

Hi,

 

how can I display the total in checkout_success.php? I've been trying for hours but can't find a solution.

 

Thanks.

Posted

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

Posted

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!

Posted

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.

Archived

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

×
×
  • Create New...