Jump to content
Sign in to follow this  
Guest

Showing the order total?

Recommended Posts

Guest

Hi,

 

I'd like to have the order total in a payment module's description. For instance:

 

define('MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION', 'Please send a cheque of $55. Thank you');

 

Any suggestions on how to do that?

 

Thank you!

Share this post


Link to post
Share on other sites
Guest

Use it as in language file:

 

define('MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION', 'Please send a cheque of %s. Thank you');

 

Look for MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION in payment module file and replace with :

 

sprintf(MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION, $currencies->format($order->info['total']))

Share this post


Link to post
Share on other sites
Guest
Use it as in language file:

 

define('MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION', 'Please send a cheque of %s. Thank you');

 

Look for MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION in payment module file and replace with :

 

sprintf(MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION, $currencies->format($order->info['total']))

Thanks for the reply, but it does not work for me.

 

If I do replace as suggested I'll get this error:

 

Fatal error: Call to a member function on a non-object in /home/www/ww7541/html/testshop/includes/modules/payment/moneyorder.php on line 72

 

If I only put $order->info['total'] without the $currencies->format it'll compile but output is "Please send a cheque of . Thank you"

Share this post


Link to post
Share on other sites
Guest

If anyone knows PLEASE reply. I've been trying to figure out this stuff for days.

 

Thanks

Share this post


Link to post
Share on other sites
Guest

Can you check by hardcoding any value for amount in the statement if it is displaying properly:

 

sprintf(MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION, '$20')

Share this post


Link to post
Share on other sites
Guest

Yes, that would display correctly.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×