Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Jul 31, 2016
1 parent 78f8da4 commit 2c6231e
Show file tree
Hide file tree
Showing 13 changed files with 240 additions and 3 deletions.
19 changes: 19 additions & 0 deletions app/appadmin/config/appadmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,23 @@
'modules'=>$modules,
/* only config in front web */
//'bootstrap' => ['store'],
'components' => [
'user' => [
'identityClass' => 'fecadmin\models\AdminUser',
'enableAutoLogin' => true,
],

'errorHandler' => [
'errorAction' => 'fecadmin/error',
],

'urlManager' => [
'class' => 'yii\web\UrlManager',
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
'' => 'fecadmin/index/index',
],
],
],
];
8 changes: 8 additions & 0 deletions app/appapi/config/appapi.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@
],
],

'user' => [
'identityClass' => 'fecadmin\models\AdminUser',
'enableAutoLogin' => true,
],

'errorHandler' => [
'errorAction' => 'site/error',
],

],

Expand Down
40 changes: 40 additions & 0 deletions app/appfront/config/appfront.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,46 @@
],
],
],
'assetManager' => [
'forceCopy' => true,
],
'user' => [
'identityClass' => 'fecadmin\models\AdminUser',
'enableAutoLogin' => true,
],

'errorHandler' => [
'errorAction' => 'site/error',
],



'urlManager' => [
'class' => 'yii\web\UrlManager',
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
'' => 'cms/home/index',
],
//'baseUrl' => '/fr/',
],



'request' => [
'class' => 'fecshop\yii\web\Request',
/*
'enableCookieValidation' => true,
'enableCsrfValidation' => true,
'cookieValidationKey' => 'O1d232trde1x-M97_7QvwPo-5QGdkLMp#@#@',
'noCsrfRoutes' => [
'catalog/product/addreview',
'favorite/product/remark',
'paypal/ipn/index',
'paypal/ipn',
],
*/
],
],

];
82 changes: 82 additions & 0 deletions app/apphtml5/config/apphtml5.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @license http://www.fecshop.com/license/
*/
# 本文件在app/web/index.php 处引入。
# fecshop - appfront 的核心模块
$modules = [];
foreach (glob(__DIR__ . '/modules/*.php') as $filename){
$modules = array_merge($modules,require($filename));
}
# 此处也可以重写fecshop的组件。供调用。
return [
'modules'=>$modules,
/* only config in front web */
'bootstrap' => ['store'],
'params' => [
/* appfront base theme dir */
'appfrontBaseTheme' => '@fecshop/app/apphtml5/theme/base/front',
'appfrontBaseLayoutName'=> 'main.php',
],
# language config.
'components' => [
'i18n' => [
'translations' => [
'apphtml5' => [
//'class' => 'yii\i18n\PhpMessageSource',
'class' => 'fecshop\yii\i18n\PhpMessageSource',
'basePaths' => [
'@fecshop/app/apphtml5/languages',
'@apphtml5/languages',
],
'sourceLanguage' => 'en_US', # 如果 en_US 也想翻译,那么可以改成en_XX。
],
],
],
'assetManager' => [
'forceCopy' => true,
],
'user' => [
'identityClass' => 'fecadmin\models\AdminUser',
'enableAutoLogin' => true,
],

'errorHandler' => [
'errorAction' => 'site/error',
],



'urlManager' => [
'class' => 'yii\web\UrlManager',
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
'' => 'cms/home/index',
],
//'baseUrl' => '/fr/',
],



'request' => [
'class' => 'fecshop\yii\web\Request',
/*
'enableCookieValidation' => true,
'enableCsrfValidation' => true,
'cookieValidationKey' => 'O1d232trde1x-M97_7QvwPo-5QGdkLMp#@#@',
'noCsrfRoutes' => [
'catalog/product/addreview',
'favorite/product/remark',
'paypal/ipn/index',
'paypal/ipn',
],
*/
],
],

];
1 change: 1 addition & 0 deletions app/apphtml5/config/modules/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!.gitignore
1 change: 1 addition & 0 deletions app/apphtml5/languages/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!.gitignore
Empty file added app/apphtml5/modules/.gitignore
Empty file.
Empty file added app/apphtml5/theme/.gitignore
Empty file.
82 changes: 82 additions & 0 deletions app/appserver/config/appserver.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @license http://www.fecshop.com/license/
*/
# 本文件在app/web/index.php 处引入。
# fecshop - appfront 的核心模块
$modules = [];
foreach (glob(__DIR__ . '/modules/*.php') as $filename){
$modules = array_merge($modules,require($filename));
}
# 此处也可以重写fecshop的组件。供调用。
return [
'modules'=>$modules,
/* only config in front web */
'bootstrap' => ['store'],
'params' => [
/* appfront base theme dir */
//'appfrontBaseTheme' => '@fecshop/app/appfront/theme/base/front',
//'appfrontBaseLayoutName'=> 'main.php',
],
# language config.
'components' => [
'i18n' => [
'translations' => [
'appserver' => [
//'class' => 'yii\i18n\PhpMessageSource',
'class' => 'fecshop\yii\i18n\PhpMessageSource',
'basePaths' => [
'@fecshop/app/appserver/languages',
'@appserver/languages',
],
'sourceLanguage' => 'en_US', # 如果 en_US 也想翻译,那么可以改成en_XX。
],
],
],
'assetManager' => [
'forceCopy' => true,
],
'user' => [
'identityClass' => 'fecadmin\models\AdminUser',
'enableAutoLogin' => true,
],

'errorHandler' => [
'errorAction' => 'site/error',
],



'urlManager' => [
'class' => 'yii\web\UrlManager',
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
'' => 'cms/home/index',
],
//'baseUrl' => '/fr/',
],



'request' => [
'class' => 'fecshop\yii\web\Request',
/*
'enableCookieValidation' => true,
'enableCsrfValidation' => true,
'cookieValidationKey' => 'O1d232trde1x-M97_7QvwPo-5QGdkLMp#@#@',
'noCsrfRoutes' => [
'catalog/product/addreview',
'favorite/product/remark',
'paypal/ipn/index',
'paypal/ipn',
],
*/
],
],

];
1 change: 1 addition & 0 deletions app/appserver/config/modules/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!.gitignore
Empty file.
Empty file.
9 changes: 6 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
"keywords": [
"yii2",
"fecshop" ,
"fancyecommerce"
"fancyecommerce" ,
"shop" ,
"ecommerce" ,
"cart"
],
"homepage": "https://github.com/fancyecommerce/yii2_fecshop",
"type": "yii2-extension",
"license": "BSD-3-Clause",
"license": "OSL-3",
"support": {
"source": "https://github.com/fancyecommerce/yii2_fecshop"
},
Expand All @@ -22,7 +25,7 @@
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": ">=2.0.6" ,
"fancyecommerce/fec_admin":"~1.3.5.8",
"fancyecommerce/fec_admin":"~1.3.5.9",
"yiisoft/yii2-mongodb": "~2.0.0" ,
"skeeks/yii2-assets-auto-compress": "*"
},
Expand Down

0 comments on commit 2c6231e

Please sign in to comment.