From 5259753bb267ee714c12891c8895c4f182a5c746 Mon Sep 17 00:00:00 2001 From: Jason Irish Date: Fri, 12 Oct 2018 13:58:33 -0500 Subject: [PATCH] OptionItem - set Weight to Decimal (#328) fixes #325 --- src/Model/OptionItem.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/OptionItem.php b/src/Model/OptionItem.php index 57e258a..fbdceeb 100755 --- a/src/Model/OptionItem.php +++ b/src/Model/OptionItem.php @@ -45,7 +45,7 @@ class OptionItem extends DataObject */ private static $db = array( 'Title' => 'Text', - 'WeightModifier' => 'Int', + 'WeightModifier' => 'Decimal', 'CodeModifier' => 'Text', 'PriceModifier' => 'Currency', 'WeightModifierAction' => "Enum('Add,Subtract,Set','Add')", @@ -173,7 +173,7 @@ public function getCMSFields() // Weight Modifier Fields HeaderField::create('WeightHD', _t('OptionItem.WeightHD', 'Modify Weight'), 3), - NumericField::create('WeightModifier') + TextField::create('WeightModifier') ->setTitle(_t('OptionItem.WeightModifier', 'Weight')), DropdownField::create( 'WeightModifierAction',