We should add some validation there, for when you don't have a rule, for the quantity for it to be less or equal than what the mysql field support.
PDOException: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'quantity' at row 1: UPDATE {commerce_line_item} SET type=:db_update_placeholder_0, line_item_label=:db_update_placeholder_1, quantity=:db_update_placeholder_2, created=:db_update_placeholder_3, changed=:db_update_placeholder_4 WHERE (line_item_id = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => product [:db_update_placeholder_1] => 001 [:db_update_placeholder_2] => 5000000000000 [:db_update_placeholder_3] => 1295436956 [:db_update_placeholder_4] => 1295619392 [:db_condition_placeholder_0] => 10 ) in drupal_write_record() (line 6776 of /Users/henrique/Webroot/commerce/includes/common.inc).
Comments
Comment #1
recidive commentedComment #2
rszrama commentedHmm, so we're using a decimal (10,2) column for quantity right now. I'm not inclined to change that at this point. I thought at first to just add validation for the maximum quantity, but that's an arbitrary number to try and craft checking / messaging for. Instead I'm just going to limit the length of the quantity input box to 8 and we can address this problem later if need be. Sites that really need more quantity can alter the form as is.
https://github.com/rszrama/drupalcommerce/commit/fe304a599dfe811a640335f...