john222 Posted July 4, 2004 Posted July 4, 2004 Hi, how can I display the total in checkout_success.php? I've been trying for hours but can't find a solution. Thanks.
john222 Posted July 4, 2004 Author Posted July 4, 2004 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
kagg Posted July 4, 2004 Posted July 4, 2004 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!
john222 Posted July 4, 2004 Author Posted July 4, 2004 Thanks for the answer. I've tried it but it doesn't work. Any idea?
john222 Posted July 5, 2004 Author Posted July 5, 2004 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.