我想缩短订单号(增加 id),但我不想使用任何模块。

有帮助吗?

解决方案

要减少位数,您需要修改 increment_pad_length 在里面 eav_entity_type 表(对于 order 当然是行)。

您可以通过修改以下内容来更改前缀 increment_prefix 值在 eav_entity_store 桌子。(使用 entity_type_id 默认情况下,Magento 使用商店的 id (1) 作为前缀。

如果您有兴趣了解有关增量 ID 的更多信息,请查看 Mage_Eav_Model_Entity_Increment_NumericMage_Eav_Model_Entity_Increment_Abstract 负责根据数据库设置生成下一个可用 ID 的类。

编辑: 您甚至可以通过扩展我上面提到的抽象类来创建自己的增量逻辑。

其他提示

我不知道这个模块,但你可以“轻松”调整表 eav_entity_store 。您可以在 eav_entity_type 中查找entity_id

许可以下: CC-BY-SA归因
scroll top