Magento管理表单未使用十进制保存十进制值

Muk*_*esh 1 magento magento-1.7

对于我的自定义模块之一,我有以下sql安装脚本

$installer = $this;

$installer->startSetup();

$installer->run("


    CREATE TABLE {$this->getTable('wholesale')} (
      `wholesale_id` int(11) unsigned NOT NULL auto_increment,
      `title` varchar(255) NOT NULL default '',
      `percentage` float(5,3) NOT NULL,
       `status` smallint(6) NOT NULL default '0',
      `created_time` datetime NULL,
      `update_time` datetime NULL,
      PRIMARY KEY (`wholesale_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

        ");

    $installer->endSetup(); 
Run Code Online (Sandbox Code Playgroud)

传递给此百分比的值float(5,3)NOT NULL,列以十进制保存,但始终以00为例。如果我保存一个值10.23,它将另存为10.00。

请帮忙

小智 5

我遇到了同样的问题。用“刷新Magento缓存”清除缓存后,它开始正确保存。就我而言,我更改了该列,并对其进行了缓存。