Author Topic: VM Cart generating 5 digits past the decimal instead of 2 for total amount  (Read 2237 times)

rich69

  • Beginner
  • *
  • Posts: 6
This is a problem integrating VM with iTransact Payment Gateway Module.

The shopping cart is generating 5 digits past the decimal in the total transaction amount instead of 2.  This causes an error at the payment gateway.

For example:

<input type="hidden" name="1-cost" value="163.09000" />

Tech support at iTransact found that when the 3 zeros at the end are removed (ie. "163.09"), the transaction processed.

What setting in VM needs to be changed to only allow 2 decimal places to appear in the shopping cart form?

Please note; my setting under Edit Store; Currency Display Style; Decimals = 2

Thank you


mlipscomb

  • Contributing Developer
  • Beginner
  • *
  • Posts: 24
  • US-Based Development
    • US-Based Joomla and Virtuemart Design and Development
Re: VM Cart generating 5 digits past the decimal instead of 2 for total amount
« Reply #1 on: November 19, 2009, 19:12:39 pm »
I'm not sure what would be causing that off the top of my head, but if the decimal places are set to "2" then this obviously shouldn't be an issue.

I would try clearing the site cache.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10272
  • VirtueMart Version: 3+
Re: VM Cart generating 5 digits past the decimal instead of 2 for total amount
« Reply #2 on: November 19, 2009, 20:19:17 pm »
check your database and see if it says 2
I do NOT do development work for hire.

rich69

  • Beginner
  • *
  • Posts: 6
Re: VM Cart generating 5 digits past the decimal instead of 2 for total amount
« Reply #3 on: November 20, 2009, 00:06:02 am »
I checked the database;

Table: jos_vm_orders, Field: order_total is set to 15,5 ie. 5 digits after the decimal, so changed it to 2 and now it works fine.

Thank you very much for your assistance.

Rich