2017 © Pedro Peláez
 

yii2-extension migration

ecshop 数据导入到 fecshop

image

kaykay012/migration

ecshop 数据导入到 fecshop

  • Monday, July 2, 2018
  • by kaykay012
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

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 '';
    }

The Versions

02/07 2018

dev-master

9999999-dev

ecshop 数据导入到 fecshop

  Sources   Download

BSD-3-Clause

The Requires

 

by kai cui

yii2 fecshop ecshop