I need to change the precision of Drupal commerce quantities to 3 decimal places.

To do this I edited drupal_commerce_line_item and changed the quantity field from decimal(10,2) to decimal(11,3).

Is this OK? (don't want repercussions) and is there anything else I need to do?

1 Answer 1


In theory, changing the commerce_line_item field's SQL (schema) definition ought to be enough. However, a cursory review of a few modules shows that some of them will round the value to 2 decimal places before using it, negating the change. You'll probably need to change it and then test it to ensure that every module you're using it with will work as you intend.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.