dev-master
9999999-devecshop 数据导入到 fecshop
BSD-3-Clause
The Requires
by kai cui
yii2 fecshop ecshop
ecshop 数据导入到 fecshop
涉及到的表: users, category, goods, goods_cat, goods_galery, volume_price orders, order_info,, (*1)
composer require --prefer-dist kaykay012/migration
or 在根目录的composer.json
中添加, (*2)
"kaykay012/migration": "*"
然后执行, (*3)
composer update
1.配置文件复制, (*4)
将vendor\kaykay012\migration\config\fecshop_migration.php
复制到
@common\config\fecshop_third_extensions\fecshop_migration.php
(需要创建该文件), (*5)
该文件是扩展的配置文件,通过上面的操作,加入到fecshop的插件配置中., (*6)
2.可能会遇到的错误, (*7)
Exception 'yii\base\UnknownPropertyException' with message 'Getting unknown property: yii\console\Application::user' in F:\phpStudy\PHPTutorial\WWW\fecshop\vendor\yiisoft\yii2\base\Component.php:154
解决办法:
修改文件 vendor\fancyecommerce\fec\helpers\CUser.php
, (*8)
# 3.得到当前用户的id public static function getCurrentUserId() { if (!isset(Yii::$app->user)) { return ''; } if ($identity = Yii::$app->user->identity) { if (isset($identity['id']) && !empty($identity['id'])) { return $identity['id']; } } return ''; }
ecshop 数据导入到 fecshop
BSD-3-Clause
yii2 fecshop ecshop