close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Rounding problem

Thread began 4/24/2017 8:24 am by info4753 | Last modified 4/26/2017 9:12 am by Ray Borduin | 606 views | 6 replies |

info4753

Rounding problem

If I add an item with the price 0.52 to the ecart, 0.52 is added
If I add an item with the price 5.17 to the ecart, 5.20 is added

How can I define the ecart so that 5.17 is added as 5.17?

In the Database the unitPrice is defined as float 10,2 the ItemPrice in the Ecart is defined as USD, Currency.

Thanks for any help

Sign in to reply to this post

Ray BorduinWebAssist

Does the price look correct on the page and in the database? It should allow you to add that amount, so something is causing it to not work correctly. If you give me FTP access and a url to reproduce I can try to help debugging it.

Sign in to reply to this post
Did this help? Tips are appreciated...

info4753

Thanks Ray

It looks correct in the datbase and on the detail page. Just inside the cart it's being rounded. FTP data added to pm

Sign in to reply to this post

Ray BorduinWebAssist

For some reason using a prepared statement in MySQLi was causing the value to be rounded. I can't figure out why. What I did to solve the problem is I added a property to the rsobj.js file that allows you to turn off prepared statements. That seems to have fixed it.

Sign in to reply to this post
Did this help? Tips are appreciated...

info4753

Thanks a lot Ray! But the updated file causes the following error on other pages (pm). I've renamed your new file for the detail page, so it runs now.

Sign in to reply to this post

Ray BorduinWebAssist

I made an update that should address this issue. If you still have problems please include a link to the page that has the problem so I can debug it.

Sign in to reply to this post
Did this help? Tips are appreciated...

info4753

Thanks a lot Ray. Seems to work fine now.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...