我在虚拟机上通过composer下载,然后出现这种问题,,怎么解决啊?下载后好像不完整的
看报错信息嘛, Project directory fecshop/ is not empty
, 你目录下的fecshop文件夹里面有文件
,进去清空,然后在试试。
由于composer网速实在不友好,因此,我打包了一份放到了百度云盘, 点击这里进入下载地址为:http://pan.baidu.com/s/1b63eXo#list/path=/tools 进入后,下载fecshop.1.0.3.3.zip ,目前只有这一个版本。
@LOVE520 [#2楼](#comment2) 要么你去百度网盘下载吧,
点击这里进入下载地址为: http://pan.baidu.com/s/1b63eXo#list/path=/tools
进入后,下载fecshop.1.0.3.3.zip
这个是composer安装好了的文件,下载打包后,你在继续按照文档安装和配置:
@LOVE520 [#4楼](#comment4) 看文档嘛,main-local.php找不到,你不按照文档来操作
对于原来的composer安装,执行的命令如下:
composer global require "fxp/composer-asset-plugin:^1.3.1"
composer create-project fancyecommerce/fecshop-app-advanced fecshop 1.0.3.3
cd fecshop
composer update
./init
如果你使用的百度云盘的压缩包:
1.解压压缩包
2.进入压缩包文件夹
3.执行 ./init
命令,进行初始化文件。
就会生成main-local.php
你没有Yii2框架基础,可以先去玩玩Yii2框架。
对于多语言站点,需要配置文件:
@app\config\fecshop_local_services\Store.php
中设置的
譬如:(这个在文档里面都有的,你不去看:http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-fecshop-about-config.html)
<?php
return [
'store' => [
'class' => 'fecshop\services\Store',
'stores' => [
# 数据的key就是域名
'appfront.fecshoptest.com' => [
'language' => 'en_US', # 语言必须在上面第五步的fecshoplang中定义,否则将无法得到语言属性。
'languageName' => 'English', # 在添加store的时候,必须查看 添加的语言在 fecshoplang中是否定义。
# 定义本地模板路径,用来重写fecshop的模板,或者开发新的模板文件。
//'localThemeDir' => '@appfront/theme/terry/theme01',
# 定义第三方模板路径,用来重写fecshop的模板,或者开发新的模板文件。
'thirdThemeDir' => [],
# 当前语言的默认货币,货币必须在上面第六步的配置中存在
'currency' => 'USD',
'mobile' => [ # 当设备满足什么条件的时候,进行跳转。
'enable' => true,
'condition' => ['phone','tablet'], # phone 代表手机,tablet代表平板
'redirectUrl' => 'apphtml5.fecshoptest.com', # 如果是移动设备访问进行域名跳转
],
# 第三方账号登录配置
'thirdLogin' => [
'facebook' =>[ #fb api配置 ,fb可以一个app设置pc和手机两个域名
'facebook_app_id' => '184963',
'facebook_app_secret' => '2e097dd7139',
],
"google" => [ #谷歌api visit https://code.google.com/apis/console to generate your google api
'CLIENT_ID' => '38037grhccontent.com',
'CLIENT_SECRET' => 'ei8RaoCHYm0rrwO',
],
]
//'image' => [
// 'domain' => 'img.appfront.fancyecommerce.com',
// 'baseDir'=> '@appimage/appfront',
//]
],
'appfront.fecshoptest.com/fr' => [
'language' => 'fr_FR',
'languageName' => 'Fran?ais',
'localThemeDir' => '@appfront/theme/terry/theme01',
'thirdThemeDir' => [],
'currency' => 'RMB',
'mobile' => [
'enable' => true,
'condition' => ['phone'], # phone 代表手机,tablet代表平板。
'redirectDomain' => 'apphtml5.fecshoptest.com/fr', # 跳转后的url。
],
],
'appfront.fecshoptest.es' => [
'language' => 'es_ES',
'languageName' => 'Espa?ol',
'localThemeDir' => '@appfront/theme/terry/theme01',
'thirdThemeDir' => [],
'currency' => 'USD',
'mobile' => [
'enable' => true,
'condition' => ['tablet'],
'redirectDomain' => 'fecshop.apphtml5.es.fancyecommerce.com',
],
],
'appfront.fecshoptest.com/cn' => [
'language' => 'zh_CN',
'languageName' => '中文',
'localThemeDir' => '@appfront/theme/terry/theme01',
'thirdThemeDir' => [],
'currency' => 'RMB',
'mobile' => [
'enable' => false,
'condition' => ['phone','tablet'],
'redirectDomain' => 'fecshop.apphtml5.fancyecommerce.com/cn',
],
],
],
],
];
对于上面配置文件中的 stores
数组,每一个子项,就是一个store的配置,譬如:appfront.fecshoptest.com
,
appfront.fecshoptest.com/fr
, 你可以在里面看到各个store具体譬如,譬如语言货币模板等设置。
如果您在nginx 将 域名 appfront.fecshoptest.com 设置到文件路径 @appfront/web 目录,那么您可以访问appfront.fecshoptest.com,对于appfront.fecshoptest.com/fr ,就是对应到 @appfront/web/fr 中。
您还可以在nginx将 appfront.fecshoptest.es 也对应到@appfront/web目录中。
有抓狂的感觉很正常,光Yii2框架,如果想玩精通了,怎么得一年的时间,如果没有底子,学习起来的确感觉很费劲,这很正常。