Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Showing the order total?


Guest

Recommended Posts

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!

Link to comment
Share on other sites

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']))
Link to comment
Share on other sites

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"

Link to comment
Share on other sites

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

 

sprintf(MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION, '$20')
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...