Menu

#23 Configurable dollar threshold

open
nobody
None
5
2012-11-15
2004-12-15
Anonymous
No

My wife tried to add a nice, sporty Honda S2000 to her
wishlist, however the system currently caps the total
at $9,999.00 (her dream car is $35,000).

My first thought was to request upping the cap to
something really big (like a $99 million), but then I
realized, it would be better if this were customizable
as a user attribute (so that I can cap my kids requests :o)

Discussion

  • Ryan Walberg

    Ryan Walberg - 2004-12-15

    Logged In: YES
    user_id=1044557

    Yeah, it's actually MySQL that's capping it at $9,999.00
    (TODO: switch to a Real Database). I am considering
    changing the price field to a more accommodating type, in
    which case yeah, I'll put in a configurable cap for your
    kids. Thanks.

     
  • Nobody/Anonymous

    Logged In: NO

    Answering my own post.. partly. This may be obvious to most
    people (I haven't really done any kind of programming
    before), but I did a little reading on PHP and MySQL, and
    realized that the limitation is in the database structure
    for item price.

    The "price" type is set at "decimal(5,2)" which limits the
    total to $9,999.99. If you set the type to "decimal(7,2)" it
    gives you a max of $999,999.99.. plenty for my wifes car :o)

    I would still like, however, the ability to set an arbitrary
    limit per user.. back to the docs!

     

Log in to post a comment.

MongoDB Logo MongoDB