This is the page. The code that queries the results is here: http://pastebin.com/d51bfa53f
I can't make any sense out of how OSCommerce works. Let me know if you need anything else. Also, is this just a common problem in SQL Queries, PHP loops, or in some math being wrong? I am looking to be pointed in the right direction, not necessarily needing an exact answer as this is a hacked/custom OsCommerce.