Results 1 to 1 of 1

removing comma from amount

This is a discussion on removing comma from amount within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Hi there, I'm having a problem with transactions over $1000 being rejected by my bank gateway because of the comma ...

      
  1. #1
    Active Member
    Join Date
    Aug 2007
    Posts
    145
    Rep Power
    5


    Default removing comma from amount - Resolved

    Hi there,

    I'm having a problem with transactions over $1000 being rejected by my bank gateway because of the comma being pushed through. I removed it from the currency and it no longer displays during checkout but for some reason it is still being pushed through to my merchant facility.

    I think the code at fault is the following:


    Code:
    tep_draw_hidden_field('amount', number_format(($order->info['total']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)));
    Can someone please edit this code for me so the amount is done without a thousand comma? ie: 1234.56 instead of 1,234.56

    Thanks very much in advance.

    Also if this isn't the place to be looking then if you have suggestions I'd love to hear them


    RESOLUTION:

    The code should read as follows:
    Code:
    tep_draw_hidden_field('amount', round(($order->info['total']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)));
    ie: The number_format() function adds the commas. It should use round()
    Last edited by tcshadow; 12-15-2009 at 06:28 PM.

Similar Threads

  1. Minimum Order Amount
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 03-19-2008, 04:20 PM
  2. Minimum Order Amount
    By michael_s in forum New osCommerce Contributions
    Replies: 1
    Last Post: 11-01-2007, 08:03 PM
  3. Comma and point in quantity field (,.)
    By nexx in forum osCmax v2 Installation issues
    Replies: 4
    Last Post: 06-05-2007, 04:11 AM
  4. Minimum Order Amount
    By jgkiefer in forum osCmax v1.7 Discussion
    Replies: 3
    Last Post: 03-05-2004, 10:47 AM
  5. Fixed amount COD fee
    By Lynoure in forum osCmax v1.7 Discussion
    Replies: 6
    Last Post: 02-17-2004, 01:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •