close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Odd zeroed out quantities and incorrect totals

Thread began 4/07/2020 9:22 am by Justin@AdventDesign | Last modified 4/08/2020 5:04 pm by Ray Borduin | 29 views | 4 replies |

Justin@AdventDesign

Odd zeroed out quantities and incorrect totals

So we have an ecart system installed many years ago with over 5000 transactions under it's belt. Recently within the last 2 weeks, we've had two anomalies that are very concerning. We did not change anything on the system for 6 months prior to this issue, but it just popped up all of the sudden. We've had two orders where customers went through the normal checkout process, but at some point items got zeroed out, but still show in the list, and the order total doesn't make any sense. The customer reports they intended to order 1 of all of the items listed.

I've looked at everything and tested the snot out of the system, and can't get this issue to replicate no matter what I do. They've had 130 orders since without issue. I'm at a loss here. Any conceivable way you can think of that a glitch like this could arise? I'm really concerned, but given how rare it is, I'm not sure how to track it down.

Sign in to reply to this post

Ray BorduinWebAssist

I really can't imagine what might cause this. Do you have inventory control that might have automatically removed items but then not updated the cart properly? Is this display directly from the cart or from the database? Maybe the insert into the database had issues.

Did you try adding the exact same items to the cart?

In order to solve an issue I always have to be able to reproduce it. Otherwise I wouldn't be able to test if the fix worked and I wouldn't really know what to fix at all if it can't be reproduced. So the first challenge will be to figure out the exact steps to try to reproduce it.

If you send me FTP access then I can take a look a the code to see if I can spot something that would help me reproduce it. Is that screen grab from an email or from a cart display?

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

Justin@AdventDesign

No inventory control.

Display is exactly as it is in the database. The items are listed related to the order but some have a "0" quantity just like you're seeing in the screen shot.

Yes I tried the exact same items in the cart. I tried entering a "0" and updating. I tried adding from the detail page with a "0" in the quantity. In both cases it doesn't leave the item in with a "0", so it behaves as it should. I can't reproduce the effect.

LITERALLY JUST GOT EMAIL FROM THE CLIENT AS I WAS TYPING WITH WHAT APPEARS TO BE THE ANSWER!

They just realized the items causing the issue were a "by the pound" candy item. If the customer orders 0.5 lbs, the shopping cart handles the decimals fine and computes everything properly. However when the cart writes to the DB, the qty field is set as int(11), so the decimal value gets dropped and the value goes to zero. Then when the order shows in the admin, it shows the zero and things don't total up.

So... the solution would seem to be simply changing the qty structure to decimal (10,1). Can you think of any reason that might cause problems elsewhere in the cart system if the qty was no longer an integer value?

Sign in to reply to this post

Ray BorduinWebAssist

No I think that sounds like the correct answer. Update your database column to a double and test and see if that fixes it.

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

Justin@AdventDesign

In the end, they decided they didn't want to sell partial pound weights anyway, so we opted to force an integer on the quantity input field rather than changing the DB. Thanks for your help.

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...