NoteStar 5 gadi atpakaļ
revīzija
1277f6799f
100 mainītis faili ar 1759 papildinājumiem un 0 dzēšanām
  1. 3 0
      .bowerrc
  2. 53 0
      .gitignore
  3. 10 0
      LICENSE.md
  4. 1 0
      README.md
  5. 72 0
      Vagrantfile
  6. 2 0
      addons/.gitignore
  7. 2 0
      appadmin/.gitignore
  8. 2 0
      appadmin/config/.gitignore
  9. 1 0
      appadmin/config/bootstrap.php
  10. 64 0
      appadmin/config/fecshop_local.php
  11. 3 0
      appadmin/config/fecshop_local_modules/.gitignore
  12. 30 0
      appadmin/config/fecshop_local_modules/Fecadmin.php
  13. 40 0
      appadmin/config/fecshop_local_services/Admin.php
  14. 53 0
      appadmin/config/fecshop_local_services/FecshopLang.php
  15. 75 0
      appadmin/config/fecshop_local_services/Page.php
  16. 29 0
      appadmin/config/fecshop_third.php
  17. 46 0
      appadmin/config/main.php
  18. 12 0
      appadmin/config/params.php
  19. 1 0
      appadmin/languages/.gitignore
  20. 11 0
      appadmin/languages/de-DE/appadmin.php
  21. 11 0
      appadmin/languages/en-US/appadmin.php
  22. 11 0
      appadmin/languages/es-ES/appadmin.php
  23. 12 0
      appadmin/languages/fr-FR/appadmin.php
  24. 11 0
      appadmin/languages/it-IT/appadmin.php
  25. 11 0
      appadmin/languages/nl-NL/appadmin.php
  26. 11 0
      appadmin/languages/pt-PT/appadmin.php
  27. 11 0
      appadmin/languages/ru-RU/appadmin.php
  28. 85 0
      appadmin/languages/zh-CN/appadmin.php
  29. 1 0
      appadmin/local/local_components/.gitignore
  30. 1 0
      appadmin/local/local_events/.gitignore
  31. 1 0
      appadmin/local/local_interfaces/.gitignore
  32. 1 0
      appadmin/local/local_migrations/.gitignore
  33. 1 0
      appadmin/local/local_models/.gitignore
  34. 63 0
      appadmin/local/local_models/mongodb/Category.php
  35. 3 0
      appadmin/local/local_modules/.gitignore
  36. 1 0
      appadmin/local/local_services/.gitignore
  37. 1 0
      appadmin/local/local_yii/.gitignore
  38. 4 0
      appadmin/runtime/.gitignore
  39. 2 0
      appadmin/runtime/cache/.gitignore
  40. 2 0
      appadmin/runtime/upload/.gitignore
  41. 1 0
      appadmin/theme/local/theme01/.gitignore
  42. 1 0
      appadmin/theme/local/theme01/layouts/.gitignore
  43. BIN
      appadmin/uploads/product/product_1492501121_product.xlsx
  44. BIN
      appadmin/uploads/product/product_1492501160_product.xlsx
  45. 1 0
      appadmin/views/layouts/main_ajax.php
  46. 8 0
      appadmin/web/.gitignore
  47. 6 0
      appadmin/web/.htaccess
  48. 2 0
      appadmin/web/assets/.gitignore
  49. BIN
      appadmin/web/favicon.ico
  50. 3 0
      appadmin/web/skin/.gitignore
  51. 3 0
      appadmin/web/skin/default/.gitignore
  52. 3 0
      appadmin/web/skin/default/images/.gitignore
  53. BIN
      appadmin/web/skin/default/images/blue_logo.png
  54. 1 0
      appapi/.gitignore
  55. 2 0
      appapi/config/.gitignore
  56. 1 0
      appapi/config/bootstrap.php
  57. 57 0
      appapi/config/fecshop_local.php
  58. 1 0
      appapi/config/fecshop_local_modules/.gitignore
  59. 15 0
      appapi/config/fecshop_local_modules/V1.php
  60. 1 0
      appapi/config/fecshop_local_services/.gitignore
  61. 29 0
      appapi/config/fecshop_local_services/Session.php
  62. 29 0
      appapi/config/fecshop_third.php
  63. 51 0
      appapi/config/main.php
  64. 5 0
      appapi/config/params.php
  65. 1 0
      appapi/local/local_components/.gitignore
  66. 1 0
      appapi/local/local_events/.gitignore
  67. 1 0
      appapi/local/local_interfaces/.gitignore
  68. 1 0
      appapi/local/local_migrations/.gitignore
  69. 1 0
      appapi/local/local_models/.gitignore
  70. 1 0
      appapi/local/local_modules/.gitignore
  71. 28 0
      appapi/local/local_modules/V1/controllers/CustomerController.php
  72. 1 0
      appapi/local/local_services/.gitignore
  73. 1 0
      appapi/local/local_yii/.gitignore
  74. 3 0
      appapi/runtime/.gitignore
  75. 2 0
      appapi/runtime/cache/.gitignore
  76. 4 0
      appapi/web/.gitignore
  77. 6 0
      appapi/web/.htaccess
  78. 2 0
      appapi/web/assets/.gitignore
  79. 1 0
      appfront/.gitignore
  80. 2 0
      appfront/components/.gitignore
  81. 2 0
      appfront/config/.gitignore
  82. 1 0
      appfront/config/bootstrap.php
  83. 61 0
      appfront/config/fecshop_local.php
  84. 1 0
      appfront/config/fecshop_local_modules/.gitignore
  85. 126 0
      appfront/config/fecshop_local_modules/Catalog.php
  86. 56 0
      appfront/config/fecshop_local_modules/Catalogsearch.php
  87. 43 0
      appfront/config/fecshop_local_modules/Cms.php
  88. 14 0
      appfront/config/fecshop_local_modules/Mytest.php
  89. 1 0
      appfront/config/fecshop_local_services/.gitignore
  90. 49 0
      appfront/config/fecshop_local_services/Cache.php
  91. 23 0
      appfront/config/fecshop_local_services/Event.php
  92. 46 0
      appfront/config/fecshop_local_services/FecshopLang.php
  93. 125 0
      appfront/config/fecshop_local_services/Page.php
  94. 32 0
      appfront/config/fecshop_local_services/Payment.php
  95. 16 0
      appfront/config/fecshop_local_services/Search.php
  96. 9 0
      appfront/config/fecshop_local_services/Store.php
  97. 14 0
      appfront/config/fecshop_local_services/Url.php
  98. 30 0
      appfront/config/fecshop_third.php
  99. 80 0
      appfront/config/main.php
  100. 0 0
      appfront/config/params.php

+ 3 - 0
.bowerrc

@@ -0,0 +1,3 @@
+{
+    "directory" : "vendor/bower"
+}

+ 53 - 0
.gitignore

@@ -0,0 +1,53 @@
+# doc file
+.a.updateBefore.md
+
+/feepackage
+/feepackage_test
+
+recp.sh
+
+# yii console command
+/yii
+
+# phpstorm project files
+.idea
+
+# netbeans project files
+nbproject
+
+# zend studio for eclipse project files
+.buildpath
+.project
+.settings
+
+# windows thumbnail cache
+Thumbs.db
+
+# composer vendor dir
+/vendor
+
+/packages
+
+# composer itself is not needed
+composer.phar
+
+# Mac DS_Store Files
+.DS_Store
+
+# phpunit itself is not needed
+phpunit.phar
+# local phpunit config
+/phpunit.xml
+
+# vagrant runtime
+/.vagrant
+
+/backend
+/doc
+/frontend
+doc.sh
+cp.sh
+myreadme.txt
+
+composer.lock
+

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 10 - 0
LICENSE.md


+ 1 - 0
README.md

@@ -0,0 +1 @@
+仿一个

+ 72 - 0
Vagrantfile

@@ -0,0 +1,72 @@
+require 'yaml'
+require 'fileutils'
+
+domains = {
+  frontend: 'y2aa-frontend.dev',
+  backend:  'y2aa-backend.dev'
+}
+
+config = {
+  local: './vagrant/config/vagrant-local.yml',
+  example: './vagrant/config/vagrant-local.example.yml'
+}
+
+# copy config from example if local config not exists
+FileUtils.cp config[:example], config[:local] unless File.exist?(config[:local])
+# read config
+options = YAML.load_file config[:local]
+
+# check github token
+if options['github_token'].nil? || options['github_token'].to_s.length != 40
+  puts "You must place REAL GitHub token into configuration:\n/yii2-app-advancded/vagrant/config/vagrant-local.yml"
+  exit
+end
+
+# vagrant configurate
+Vagrant.configure(2) do |config|
+  # select the box
+  config.vm.box = 'ubuntu/trusty64'
+
+  # should we ask about box updates?
+  config.vm.box_check_update = options['box_check_update']
+
+  config.vm.provider 'virtualbox' do |vb|
+    # machine cpus count
+    vb.cpus = options['cpus']
+    # machine memory size
+    vb.memory = options['memory']
+    # machine name (for VirtualBox UI)
+    vb.name = options['machine_name']
+  end
+
+  # machine name (for vagrant console)
+  config.vm.define options['machine_name']
+
+  # machine name (for guest machine console)
+  config.vm.hostname = options['machine_name']
+
+  # network settings
+  config.vm.network 'private_network', ip: options['ip']
+
+  # sync: folder 'yii2-app-advanced' (host machine) -> folder '/app' (guest machine)
+  config.vm.synced_folder './', '/app', owner: 'vagrant', group: 'vagrant'
+
+  # disable folder '/vagrant' (guest machine)
+  config.vm.synced_folder '.', '/vagrant', disabled: true
+
+  # hosts settings (host machine)
+  config.vm.provision :hostmanager
+  config.hostmanager.enabled            = true
+  config.hostmanager.manage_host        = true
+  config.hostmanager.ignore_private_ip  = false
+  config.hostmanager.include_offline    = true
+  config.hostmanager.aliases            = domains.values
+
+  # provisioners
+  config.vm.provision 'shell', path: './vagrant/provision/once-as-root.sh', args: [options['timezone']]
+  config.vm.provision 'shell', path: './vagrant/provision/once-as-vagrant.sh', args: [options['github_token']], privileged: false
+  config.vm.provision 'shell', path: './vagrant/provision/always-as-root.sh', run: 'always'
+
+  # post-install message (vagrant console)
+  config.vm.post_up_message = "Frontend URL: http://#{domains[:frontend]}\nBackend URL: http://#{domains[:backend]}"
+end

+ 2 - 0
addons/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 2 - 0
appadmin/.gitignore

@@ -0,0 +1,2 @@
+assets/
+controllers/

+ 2 - 0
appadmin/config/.gitignore

@@ -0,0 +1,2 @@
+main-local.php
+params-local.php

+ 1 - 0
appadmin/config/bootstrap.php

@@ -0,0 +1 @@
+<?php

+ 64 - 0
appadmin/config/fecshop_local.php

@@ -0,0 +1,64 @@
+<?php
+
+// 本文件在app/web/index.php 处引入。
+
+// fecshop的核心模块
+$modules = [];
+foreach (glob(__DIR__.'/fecshop_local_modules/*.php') as $filename) {
+    $modules = array_merge($modules, require($filename));
+}
+// services
+$services = [];
+foreach (glob(__DIR__.'/fecshop_local_services/*.php') as $filename) {
+    $services = array_merge($services, require($filename));
+}
+// 组件
+$components = [
+    'i18n' => [
+        'translations' => [
+            'appadmin' => [
+                'basePaths' => [
+                    '@appadmin/languages',
+                ],
+                // base language code
+                'sourceLanguage' => 'en_US',
+                /**
+                 * @var bool whether to force message translation when the source and target languages are the same.
+                 * Defaults to false, meaning translation is only performed when source and target languages are different.
+                 * see: @yii/i18n/MessageSource.php  @property $forceTranslation
+                 */
+                'forceTranslation' => true,
+            ],
+        ],
+    ],
+];
+
+// param
+$params = [];
+
+/**
+ * Yii框架的class rewrite重写,这个一般不用,您可以通过这个重写基本上任何的class,但是这种方式是替换,重写的class无法继承原来的class,因此是替换的方式重写
+ * Yii framework class rewrite: 文档:http://www.fecmall.com/doc/fecshop-guide/develop/cn-2.0/guide-fecmall-rewrite-func.html#7yii2classclassmapfecmall
+ */
+$yiiClassMap = [
+    // 下面是一个重写的格式例子
+    // 'fecshop\app\apphtml5\helper\test\My' => '@apphtml5/helper/My.php'
+];
+/**
+ * Fecmall model 和 block 重写,可以在RewriteMap中配置
+ * 文档地址:http://www.fecmall.com/doc/fecshop-guide/develop/cn-2.0/guide-fecmall-rewrite-func.html#8rewritemapblock-model
+ */
+$fecRewriteMap = [
+    // 下面是一个重写的格式例子
+    // '\fecshop\app\appfront\modules\Cms\block\home\Index'  => '\fectfurnilife\appfront\modules\Cms\block\home\Index',
+];
+return [
+    'modules'  => $modules,
+    'services' => $services,
+    'components' => $components,
+    'params' => $params,
+    'yiiClassMap' => $yiiClassMap,
+    'fecRewriteMap' => $fecRewriteMap,
+];
+
+

+ 3 - 0
appadmin/config/fecshop_local_modules/.gitignore

@@ -0,0 +1,3 @@
+Person.php
+Blog.php
+!.gitignore

+ 30 - 0
appadmin/config/fecshop_local_modules/Fecadmin.php

@@ -0,0 +1,30 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'fecadmin' => [
+        'params' => [
+            /**
+             * Fecshop缓存是基于redis,下面是各个入口redis配置所在的文件路径
+             * 1.`commonConfig`是公用部分
+             * 2.app开头的key,指的是各个入口的redis所在的配置文件
+             * 这个配置的作用,是为了在后台清空各个入口的全部缓存,因此需要加载相应的redis的配置
+             */
+            'cacheRedisConfigFile' => [
+                'commonConfig'       => '@common/config/main-local.php',
+                'appAdmin'           => '@appadmin/config/main.php',
+                'appApi'             => '@appapi/config/main.php',
+                'appFront'           => '@appfront/config/main.php',
+                'appHtml5'           => '@apphtml5/config/main.php',
+                'appServer'          => '@appserver/config/main.php',
+                
+            ],
+        ],
+    ],
+];
+

+ 40 - 0
appadmin/config/fecshop_local_services/Admin.php

@@ -0,0 +1,40 @@
+<?php
+/**
+ * FecShop file.
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'admin' => [
+        // 子服务
+        'childService' => [
+            'urlKey' => [
+                'urlKeyTags' => [
+                    'blog_article' 								=> 'Blog-Article',
+                ],
+            ],
+/*
+            'menu' => [
+                'menuConfig' => [
+                    'blog' => [
+                        'label' => 'Blog',
+                        'child' => [
+                            'article' => [
+                                'label' => 'Article',
+                                'child' => [
+                                    'article_manager' => [
+                                        'label' => 'Manager Article',
+                                        'url_key' => '/blog/article/manager',
+                                    ],
+                                ],
+                            ],
+                        ],
+                    ],
+
+                ],
+            ],
+*/            
+        ],
+    ],
+];

+ 53 - 0
appadmin/config/fecshop_local_services/FecshopLang.php

@@ -0,0 +1,53 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ *
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'fecshoplang' => [
+        //'class' => 'fecshop\services\FecshopLang',
+        //  mongoSearchLangName 在各个语言下字段参考资料如下:(不支持中文)
+        //  https://docs.mongodb.com/manual/reference/text-search-languages/#text-search-languages
+        'adminLangCode' => [
+            'en_US' => [
+                'code'                    => 'en',
+                'name'                   => 'English',
+            ],
+            'zh_CN' => [
+                'code'                    => 'zh',
+                'name'                   => '中文',
+            ],
+         ],
+         /*
+        'allLangCode' => [
+            // 'en_US' 是标准语言简码  code对应的值en取 “标准语言简码”的前两位字符,
+            // 该值设置后,进行了产品分类数据的添加后,不能修改,否则会出现部分翻译语言丢失。
+            'en_US' => [
+                'code'                    => 'en',
+            ],
+            'zh_CN' => [
+                'code'                    => 'zh',
+            ],
+            'fr_FR' => [
+                'code' 					=> 'fr',
+            ],
+            'de_DE' => [
+                'code' 					=> 'de',
+            ],
+            'es_ES' => [
+                'code' 					=> 'es',
+            ],
+            'ru_RU' => [
+                'code' 					=> 'ru',
+            ],
+            'pt_PT' => [
+                'code' 					=> 'pt',
+            ],
+        ],
+        */
+    ],
+];

+ 75 - 0
appadmin/config/fecshop_local_services/Page.php

@@ -0,0 +1,75 @@
+<?php
+/**
+ * FecShop file.
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'page' => [
+        'childService' => [
+            'asset' => [
+                // js 版本号,当更改了js,将这里的版本号+1,生成的js链接就会更改为  xxx.js?v=2 ,
+                // 这样做的好处是,js的链接url改变了,可以防止浏览器继续使用缓存,而不是重新加载js文件的问题。
+                'jsVersion'        => 1,
+                // css 版本号,原理同js
+                // 关于版本号更多的信息,请参看:http://www.fancyecommerce.com/2017/04/17/css-js-%E5%90%8E%E9%9D%A2%E5%8A%A0%E7%89%88%E6%9C%AC%E5%8F%B7%E7%9A%84%E5%8E%9F%E5%9B%A0%E5%92%8C%E6%96%B9%E5%BC%8F/
+                'cssVersion'    => 1,
+                // 是否每次刷新,强制发布js css到线上? 开发环境设置为true,正式环境设置为false(你也可以设置为true,但是每次刷新都会复制js和css文件到@app/web/assets/下面,耗费资源)
+                // 线上设置成false,每次访问不会强制复制js和css到发布环境,可以节省资源,但是,当css和js更新后,
+                // 需要去@app/web/assets/ 路径下,手动清空所有的文件夹和文件,当assets路径下找不到文件,就会重新复制库包里的js和css到web环境,
+                // 这是属于Yii2的知识范畴。
+                'forceCopy' => true,
+                
+                // js and css config example:
+                'jsOptions'	=> [
+                    # js config 1
+                    [
+                        'options' => [
+                            'position' =>  'POS_END',
+                        //	'condition'=> 'lt IE 9',
+                        ],
+                        'js'	=>[
+                            'js/my.js',
+                        ],
+                    ],
+                    # js config 2
+                    //[
+                    //    'options' => [
+                    //        'condition'=> 'lt IE 9',
+                    //    ],
+                    //    'js'	=>[
+                    //        'js/ie9js.js'
+                    //    ],
+                    //],
+                ],
+                # css config
+                'cssOptions'	=> [
+                    # css config 1.
+                    [
+                        'css'	=>[
+                            'css/my.css',
+                        ],
+                        // 加上这个,可以放到css的最后面
+                        'options' => [
+                            'depends'=>['fecadmin\myassets\CustomAsset'],
+                        ]
+                    ],
+
+                    # css config 2.
+                    //[
+                    //    'options' => [
+                    //        'condition'=> 'lt IE 9',
+                    //    ],
+                    //    'css'	=>[
+                    //        'css/ltie9.css',
+                    //    ],
+                    //],
+                ],
+                
+            ],
+
+
+        ],
+    ],
+];

+ 29 - 0
appadmin/config/fecshop_third.php

@@ -0,0 +1,29 @@
+<?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 处引入。
+ * 本配置文件为第三方插件库包的配置文件
+ */
+$third_config = [];
+$current_app_name = 'appadmin';
+
+if (is_array($fecmall_db_extensions_data) && !empty($fecmall_db_extensions_data)) {
+    foreach ($fecmall_db_extensions_data as $one) {
+        $configFile = Yii::getAlias($one['config_file_path']);
+        if (!file_exists($configFile)) continue;
+        $c = require($configFile);
+        $curr_config = isset($c['app'][$current_app_name]) ? $c['app'][$current_app_name] : false;
+        $app_enable = isset($curr_config['enable']) ? $curr_config['enable'] : false;
+        $app_config = isset($curr_config['config']) ? $curr_config['config'] : false;
+        if ($app_enable && is_array($app_config) && !empty($app_config)) {
+            $third_config = yii\helpers\ArrayHelper::merge($third_config, $app_config);
+        }
+    }
+}
+return $third_config;

+ 46 - 0
appadmin/config/main.php

@@ -0,0 +1,46 @@
+<?php
+
+$params = array_merge(
+    require(__DIR__.'/../../common/config/params.php'),
+    require(__DIR__.'/../../common/config/params-local.php'),
+    require(__DIR__.'/params.php'),
+    require(__DIR__.'/params-local.php')
+);
+
+return [
+    'id'       => 'app-admin',
+    // 设置时区,查看php 支持的所支持的时区列表  :http://www.php.net/manual/zh/timezones.php
+    'timeZone' => 'Asia/Shanghai',
+    'basePath' => dirname(__DIR__),
+    //'bootstrap' => ['log'],
+    'controllerNamespace' => 'appadmin\controllers',
+    // compress css and js to one file,
+    //'bootstrap'    => ['assetsAutoCompress'],
+    'components' => [
+       /*
+       #  compress css and js to one file,
+       'assetsAutoCompress' =>
+        [
+            'class'             => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent',
+            'enabled'           => true,
+            'jsCompress'        => true,
+            'cssFileCompile'    => true,
+            'jsFileCompile'     => true,
+        ],
+        */
+        'redis' => [
+            'database' => 0,
+        ],
+        'session' => [
+            //'keyPrefix' => 'appadmin_session',  如果您使用redis session,您需要去掉注释
+        ],
+        'cache' => [
+            'keyPrefix' => 'appadmin_cache',
+        ],
+        'assetManager' => [
+            'forceCopy' => true,
+        ],
+    ],
+    // 自定义参数
+    'params' => $params,
+];

+ 12 - 0
appadmin/config/params.php

@@ -0,0 +1,12 @@
+<?php
+
+return [
+    /*
+     * admin language for  attribute
+     */
+
+    'systemlog' => [
+        'enable' => 1,
+    ],
+    'localThemeDir' => '@appadmin/theme/local/theme01',
+];

+ 1 - 0
appadmin/languages/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 11 - 0
appadmin/languages/de-DE/appadmin.php

@@ -0,0 +1,11 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+ 'fecshop'  => 'de_DE app fecshop',
+];

+ 11 - 0
appadmin/languages/en-US/appadmin.php

@@ -0,0 +1,11 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+ 'fecshop'  => 'en_US app fecshop',
+];

+ 11 - 0
appadmin/languages/es-ES/appadmin.php

@@ -0,0 +1,11 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+ 'fecshop'  => 'es_ES app fecshop',
+];

+ 12 - 0
appadmin/languages/fr-FR/appadmin.php

@@ -0,0 +1,12 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+ 'fecshop'  => 'fr_FR 11app fecshop',
+ 'fecshop,{username}' =>  'fr_FR 11 app fecshop,{username}',
+];

+ 11 - 0
appadmin/languages/it-IT/appadmin.php

@@ -0,0 +1,11 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+ 'fecshop'  => 'it_IT app fecshop',
+];

+ 11 - 0
appadmin/languages/nl-NL/appadmin.php

@@ -0,0 +1,11 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+ 'fecshop'  => 'nl_NL app fecshop',
+];

+ 11 - 0
appadmin/languages/pt-PT/appadmin.php

@@ -0,0 +1,11 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+ 'fecshop'  => 'pt_PT app fecshop',
+];

+ 11 - 0
appadmin/languages/ru-RU/appadmin.php

@@ -0,0 +1,11 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+ 'fecshop'  => 'ru_RU app fecshop',
+];

+ 85 - 0
appadmin/languages/zh-CN/appadmin.php

@@ -0,0 +1,85 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'Color' => '颜色',
+    'Size' => '尺码',
+    'Color:'                          => '颜色:',
+    'color:'                          => '颜色:',
+    'Size:'                           => '尺码:',
+    'one-color'                       => '单色',
+    'red'                             => '红色',
+    'white'                           => '白色',
+    'black'                           => '黑色',
+    'blue'                            => '蓝色',
+    'green'                           => '绿色',
+    'yellow'                          => '黄色',
+    'gray'                            => '灰色',
+    'khaki'                           => '黄褐色',
+    'ivory'                           => '象牙色',
+    'beige'                           => '米色',
+    'orange'                          => '橙色',
+    'cyan'                            => '青色',
+    'leopard'                         => '豹纹',
+    'camouflage'                      => '伪装色',
+    'silver'                          => '银白色',
+    'pink'                            => '粉红色',
+    'purple'                          => '紫色',
+    'brown'                           => '棕色',
+    'golden'                          => '金色',
+    'multicolor'                      => '彩色',
+    'white-blue'                    => '白 & 蓝',
+    'white-black'                   => '白 & 黑',
+    'v-neck'                        => 'V领',
+    'Casual' => '休闲',
+    'Cute' => '可爱',
+    'Sexy & Club' => '性感',
+    'Bohemian' => '波西米亚',
+    'Vintage' => 'Vintage',
+    'Brief' => 'Brief',
+    'Work' => '工作',
+    'Novelty' => '新奇',
+    'Mini' => '迷你',
+    'Knee Length' => '膝盖长度',
+    'Mid Calf' => 'Mid Calf',
+    'Ankle Length' => '脚踝长度',
+    'Floor Length' => '地板长度',
+    
+    'color'  => '颜色',
+    'size'    => '尺码',
+    'my_remark' => '我的备注',
+    'my_email' => '我的邮箱',
+    'my_date' => '我的日期',
+    'style' => '样式',
+    'dresses-length' => '裙长',
+    'pattern-type' => '图案类型',
+    'sleeve-length' => '袖长',
+    'collar' => '领口',
+    'my_color' => '我的颜色',
+    'my_size' => '我的尺码',
+    'test3' => '测试 3',
+    'xinghao' => '型号',
+    'memory_capacity' => '内存容量',
+    'cpu' => 'Cpu',
+    'my_size2' => '我的尺寸2',
+    'my_size3' => '我的尺寸3',
+    'Animal' => '动物',
+    'Letter' => '信件',
+    'Short-Sleeves' => '半袖',
+    'sku' => 'Sku',
+    'qty' => '个数',
+    'price' => '价格',
+    'image' => '图片',
+    'delete' => '删除',
+    '' => '',
+    '' => '',
+    '' => '',
+    '' => '',
+    '' => '',
+    
+];

+ 1 - 0
appadmin/local/local_components/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appadmin/local/local_events/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appadmin/local/local_interfaces/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appadmin/local/local_migrations/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appadmin/local/local_models/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 63 - 0
appadmin/local/local_models/mongodb/Category.php

@@ -0,0 +1,63 @@
+<?php
+namespace fecshop\models\mongodb;
+
+use yii\mongodb\ActiveRecord;
+
+class Category extends ActiveRecord
+{
+    const MENU_SHOW      = 1;
+    const MENU_NOT_SHOW  = 2;
+    const STATUS_ENABLE  = 1;
+    const STATUS_DISABLE = 2;
+
+    
+    /**
+     * mongodb collection 的名字,相当于mysql的table name
+     */
+    public static function collectionName()
+    {
+        return 'category';
+    }
+    /**
+     * mongodb是没有表结构的,因此不能像mysql那样取出来表结构的字段作为model的属性
+     * 因此,需要自己定义model的属性,下面的方法就是这个作用
+     */
+    public function attributes()
+    {
+        return [
+            '_id',
+            'parent_id',
+            'name',
+            'status',
+            'menu_show',
+            'url_key',
+            'level',
+            'thumbnail_image',
+            'image',
+            'filter_product_attr_selected',
+            'filter_product_attr_unselected',
+            'description',
+            'menu_custom',
+            'title',
+            'meta_description',
+            'meta_keywords',
+            'include_in_menu',
+            'is_feature',
+            'available_sort_by',
+            'default_sort_by',
+            'theme',
+            'active_from',
+            'active_to',
+            'created_at',
+            'updated_at',
+            'created_user_id',
+            //other
+            /*
+                category filter
+                category product
+
+
+            */
+       ];
+    }
+}

+ 3 - 0
appadmin/local/local_modules/.gitignore

@@ -0,0 +1,3 @@
+Person
+Blog
+!.gitignore

+ 1 - 0
appadmin/local/local_services/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appadmin/local/local_yii/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 4 - 0
appadmin/runtime/.gitignore

@@ -0,0 +1,4 @@
+*
+!.gitignore
+!cache
+!upload

+ 2 - 0
appadmin/runtime/cache/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 2 - 0
appadmin/runtime/upload/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 1 - 0
appadmin/theme/local/theme01/.gitignore

@@ -0,0 +1 @@
+person

+ 1 - 0
appadmin/theme/local/theme01/layouts/.gitignore

@@ -0,0 +1 @@
+!.gitignore

BIN
appadmin/uploads/product/product_1492501121_product.xlsx


BIN
appadmin/uploads/product/product_1492501160_product.xlsx


+ 1 - 0
appadmin/views/layouts/main_ajax.php

@@ -0,0 +1 @@
+<?= $content;

+ 8 - 0
appadmin/web/.gitignore

@@ -0,0 +1,8 @@
+*
+!.gitignore
+!.htaccess
+!assets/
+!download/*
+!favicon.ico
+!robots.php
+!skin/

+ 6 - 0
appadmin/web/.htaccess

@@ -0,0 +1,6 @@
+<IfModule mod_rewrite.c>  
+RewriteEngine On  
+RewriteCond %{REQUEST_FILENAME} !-d  
+RewriteCond %{REQUEST_FILENAME} !-f  
+RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]  
+</IfModule>

+ 2 - 0
appadmin/web/assets/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

BIN
appadmin/web/favicon.ico


+ 3 - 0
appadmin/web/skin/.gitignore

@@ -0,0 +1,3 @@
+*
+!.gitignore
+!default/

+ 3 - 0
appadmin/web/skin/default/.gitignore

@@ -0,0 +1,3 @@
+*
+!.gitignore
+!images/

+ 3 - 0
appadmin/web/skin/default/images/.gitignore

@@ -0,0 +1,3 @@
+*
+!.gitignore
+!blue_logo.png

BIN
appadmin/web/skin/default/images/blue_logo.png


+ 1 - 0
appapi/.gitignore

@@ -0,0 +1 @@
+merge_config.php

+ 2 - 0
appapi/config/.gitignore

@@ -0,0 +1,2 @@
+main-local.php
+params-local.php

+ 1 - 0
appapi/config/bootstrap.php

@@ -0,0 +1 @@
+<?php

+ 57 - 0
appapi/config/fecshop_local.php

@@ -0,0 +1,57 @@
+<?php
+
+// 本文件在app/web/index.php 处引入。
+
+// fecshop的核心模块
+$modules = [];
+foreach (glob(__DIR__.'/fecshop_local_modules/*.php') as $filename) {
+    $modules = array_merge($modules, require($filename));
+}
+// services
+$services = [];
+foreach (glob(__DIR__.'/fecshop_local_services/*.php') as $filename) {
+    $services = array_merge($services, require($filename));
+}
+// 组件
+$components = [];
+// param
+$params = [
+    'rateLimit'             => [
+        'enable'=> false,   // 是否开启?默认不开启速度控制。
+        'limit' => [120, 60], // 速度控制[120,60] 代表  60秒内最大访问120次,
+    ],
+    /** 
+     * 该配置用来设置:允许那些账户在appapi入口进行登录获取token
+     * 1.apiUserAllow数组的值为空:代表默认是所有的后台用户
+     * 2.apiUserAllow数组中设置了用户名(数组可以设置多个),那么,只有包含在这个数组中的用户,才可以用于appapi用户登录获取access-token。其他的账户获取token就会失败
+     * 3.默认该数组为空,允许所有的appadmin的后台用户进行登录获取access-token
+     */
+    'apiUserAllow' => [
+       // 'admin','terry'
+    ],
+];
+
+/**
+ * Yii框架的class rewrite重写,这个一般不用,您可以通过这个重写基本上任何的class,但是这种方式是替换,重写的class无法继承原来的class,因此是替换的方式重写
+ * Yii framework class rewrite: 文档:http://www.fecmall.com/doc/fecshop-guide/develop/cn-2.0/guide-fecmall-rewrite-func.html#7yii2classclassmapfecmall
+ */
+$yiiClassMap = [
+    // 下面是一个重写的格式例子
+    // 'fecshop\app\apphtml5\helper\test\My' => '@apphtml5/helper/My.php'
+];
+/**
+ * Fecmall model 和 block 重写,可以在RewriteMap中配置
+ * 文档地址:http://www.fecmall.com/doc/fecshop-guide/develop/cn-2.0/guide-fecmall-rewrite-func.html#8rewritemapblock-model
+ */
+$fecRewriteMap = [
+    // 下面是一个重写的格式例子
+    // '\fecshop\app\appfront\modules\Cms\block\home\Index'  => '\fectfurnilife\appfront\modules\Cms\block\home\Index',
+];
+return [
+    'modules'  => $modules,
+    'services' => $services,
+    'components' => $components,
+    'params' => $params,
+    'yiiClassMap' => $yiiClassMap,
+    'fecRewriteMap' => $fecRewriteMap,
+];

+ 1 - 0
appapi/config/fecshop_local_modules/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 15 - 0
appapi/config/fecshop_local_modules/V1.php

@@ -0,0 +1,15 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'v1' => [
+        'controllerMap' =>[
+            'customer'=> 'appapi\local\local_modules\V1\controllers\CustomerController'
+        ]
+    ]
+];

+ 1 - 0
appapi/config/fecshop_local_services/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 29 - 0
appapi/config/fecshop_local_services/Session.php

@@ -0,0 +1,29 @@
+<?php
+/**
+ * FecShop file.
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'session' => [
+        // 【下面的三个参数,在使用php session的时候无效】
+        //  只有 \Yii::$app->user->enableSession == false的时候才有效。
+        //  说的更明确点就是:这些参数的设置是给无状态api使用的。
+        //  实现了一个类似session的功能,供appserver端使用
+        // 【对phpsession 无效】设置session过期时间,
+        'timeout' => 3600,
+        // 【对phpsession 无效】当过期时间+session创建时间 - 当前事件 < $updateTimeLimit ,则更新session创建时间
+        'updateTimeLimit' => 600,
+        // 【不可以设置phpsession】默认为php session,只有当 \Yii::$app->user->enableSession == false时,下面的设置才有效。
+        // 存储引擎  mongodb mysqldb redis
+        'storage' => 'SessionMysqldb',
+        
+        
+        //'childService' => [
+        //    'session' => [
+        //        'class' => 'fecshop\services\session\Session',
+        //    ],
+        //],
+    ],
+];

+ 29 - 0
appapi/config/fecshop_third.php

@@ -0,0 +1,29 @@
+<?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 处引入。
+ * 本配置文件为第三方插件库包的配置文件
+ */
+
+$third_config = [];
+$current_app_name = 'appapi';
+
+if (is_array($fecmall_db_extensions_data) && !empty($fecmall_db_extensions_data)) {
+    foreach ($fecmall_db_extensions_data as $one) {
+        $configFile = Yii::getAlias($one['config_file_path']);
+        $c = require($configFile);
+        $curr_config = isset($c['app'][$current_app_name]) ? $c['app'][$current_app_name] : false;
+        $app_enable = isset($curr_config['enable']) ? $curr_config['enable'] : false;
+        $app_config = isset($curr_config['config']) ? $curr_config['config'] : false;
+        if ($app_enable && is_array($app_config) && !empty($app_config)) {
+            $third_config = yii\helpers\ArrayHelper::merge($third_config, $app_config);
+        }
+    }
+}
+return $third_config;

+ 51 - 0
appapi/config/main.php

@@ -0,0 +1,51 @@
+<?php
+
+$params = array_merge(
+    require(__DIR__.'/../../common/config/params.php'),
+    require(__DIR__.'/../../common/config/params-local.php'),
+    require(__DIR__.'/params.php'),
+    require(__DIR__.'/params-local.php')
+);
+
+return [
+    'id'                  => 'app-api',
+    // 设置时区,查看php 支持的所支持的时区列表  :http://www.php.net/manual/zh/timezones.php
+    'timeZone' => 'Asia/Shanghai',
+    'basePath'            => dirname(__DIR__),
+    'controllerNamespace' => 'appapi\controllers',
+    'modules'             => $modules,
+    //'bootstrap' => ['log'],
+    //'bootstrap'    => ['assetsAutoCompress'],
+    // 自定义组件
+    'components' => [
+       /*
+       'assetsAutoCompress' =>
+        [
+            'class'             => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent',
+            'enabled'           => true,
+            'jsCompress'        => true,
+            'cssFileCompile'    => true,
+            'jsFileCompile'     => true,
+        ],
+        */
+        'redis' => [
+            'database' => 2,
+        ],
+        'session' => [
+            //'keyPrefix' => 'appapi_session',  如果您使用redis session,您需要去掉注释
+        ],
+        'cache' => [
+            'keyPrefix' => 'appapi_cache',
+        ],
+        'user' => [
+            // 【默认】不开启速度限制的 User Model
+            'identityClass' => 'fecshop\models\mysqldb\AdminUser',
+            // 开启速度限制的 User Model
+            //'identityClass' => 'fecshop\models\mysqldb\adminUser\AdminUserAccessToken',
+            
+            //'enableAutoLogin' => true,
+        ],
+    ],
+    // 自定义参数
+    'params' => $params,
+];

+ 5 - 0
appapi/config/params.php

@@ -0,0 +1,5 @@
+<?php
+
+return [
+
+];

+ 1 - 0
appapi/local/local_components/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appapi/local/local_events/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appapi/local/local_interfaces/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appapi/local/local_migrations/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appapi/local/local_models/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appapi/local/local_modules/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 28 - 0
appapi/local/local_modules/V1/controllers/CustomerController.php

@@ -0,0 +1,28 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+
+namespace appapi\local\local_modules\V1\controllers;
+
+use fecshop\app\appfront\modules\AppfrontController;
+use Yii;
+
+/**
+ * @author Terry Zhao <2358269014@qq.com>
+ * @since 1.0
+ */
+class CustomerController extends  \fecshop\app\appapi\modules\V1\controllers\CustomerController
+{
+    public function actionIndex(){
+        
+        echo 1;exit;
+    }
+    
+    
+    
+}

+ 1 - 0
appapi/local/local_services/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 1 - 0
appapi/local/local_yii/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 3 - 0
appapi/runtime/.gitignore

@@ -0,0 +1,3 @@
+*
+!cache
+!.gitignore

+ 2 - 0
appapi/runtime/cache/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 4 - 0
appapi/web/.gitignore

@@ -0,0 +1,4 @@
+*
+!.gitignore
+!assets/
+!.htaccess

+ 6 - 0
appapi/web/.htaccess

@@ -0,0 +1,6 @@
+<IfModule mod_rewrite.c>  
+RewriteEngine On  
+RewriteCond %{REQUEST_FILENAME} !-d  
+RewriteCond %{REQUEST_FILENAME} !-f  
+RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]  
+</IfModule>

+ 2 - 0
appapi/web/assets/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 1 - 0
appfront/.gitignore

@@ -0,0 +1 @@
+merge_config.php

+ 2 - 0
appfront/components/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 2 - 0
appfront/config/.gitignore

@@ -0,0 +1,2 @@
+main-local.php
+params-local.php

+ 1 - 0
appfront/config/bootstrap.php

@@ -0,0 +1 @@
+<?php

+ 61 - 0
appfront/config/fecshop_local.php

@@ -0,0 +1,61 @@
+<?php
+
+// 本文件在app/web/index.php 处引入。
+
+// fecshop的核心模块
+$modules = [];
+foreach (glob(__DIR__.'/fecshop_local_modules/*.php') as $filename) {
+    $modules = array_merge($modules, require($filename));
+}
+// services
+$services = [];
+foreach (glob(__DIR__.'/fecshop_local_services/*.php') as $filename) {
+    $services = array_merge($services, require($filename));
+}
+// 组件
+$components = [
+    'i18n' => [
+        'translations' => [
+            'appfront' => [
+                'basePaths' => [
+                    '@appfront/languages',
+                ],
+                // base language code
+                'sourceLanguage' => 'en_US',
+                /**
+                 * @var bool whether to force message translation when the source and target languages are the same.
+                 * Defaults to false, meaning translation is only performed when source and target languages are different.
+                 * see: @yii/i18n/MessageSource.php  @property $forceTranslation
+                 */
+                'forceTranslation' => true,
+            ],
+        ],
+    ],
+];
+// param
+$params = [];
+
+/**
+ * Yii框架的class rewrite重写,这个一般不用,您可以通过这个重写基本上任何的class,但是这种方式是替换,重写的class无法继承原来的class,因此是替换的方式重写
+ * Yii framework class rewrite: 文档:http://www.fecmall.com/doc/fecshop-guide/develop/cn-2.0/guide-fecmall-rewrite-func.html#7yii2classclassmapfecmall
+ */
+$yiiClassMap = [
+    // 下面是一个重写的格式例子
+    // 'fecshop\app\apphtml5\helper\test\My' => '@apphtml5/helper/My.php'
+];
+/**
+ * Fecmall model 和 block 重写,可以在RewriteMap中配置
+ * 文档地址:http://www.fecmall.com/doc/fecshop-guide/develop/cn-2.0/guide-fecmall-rewrite-func.html#8rewritemapblock-model
+ */
+$fecRewriteMap = [
+    // 下面是一个重写的格式例子
+    // '\fecshop\app\appfront\modules\Cms\block\home\Index'  => '\fectfurnilife\appfront\modules\Cms\block\home\Index',
+];
+return [
+    'modules'  => $modules,
+    'services' => $services,
+    'components' => $components,
+    'params' => $params,
+    'yiiClassMap' => $yiiClassMap,
+    'fecRewriteMap' => $fecRewriteMap,
+];

+ 1 - 0
appfront/config/fecshop_local_modules/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 126 - 0
appfront/config/fecshop_local_modules/Catalog.php

@@ -0,0 +1,126 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ *
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'catalog' => [
+        /**
+         * Yii2 controllerMap 重写机制。
+         */
+        //'controllerMap' => [
+        //    'category' => 'appfront\local\local_modules\Catalog\controllers\CategoryController',          
+        //],
+        'params'=> [
+            //##############################
+            //# 		category部分设置	 ##
+            //##############################
+            //'category_breadcrumbs' => true, // 分类页面:是否显示分类的面包屑导航。
+            //'product_breadcrumbs' => true, // 产品页面:是否显示产品的面包屑导航。
+            /*
+             * 注意:做侧栏分类产品过滤的属性,必须是select类型的,其他的类型请不要用,
+             * 对于select类型,目前不支持多语言数据库存储,select类型的各个值是通过前端翻译文件来实现翻译的、
+             * 对于color  size 对应的保存值,只可以使用 '数字','字符','空格','&','-','_' 这6类字符
+             */
+            //'category_filter_attr' => [
+            //    'color', 'size',
+            //],
+
+           // 'category_filter_category'    => true,
+           // 'category_filter_price'       => true,
+           // 'category_query'              => [
+                // 放到第一个的就是默认值,譬如下面的30
+               // 'numPerPage' => [12, 30, 60, 90],        // 产品显示个数的列举
+                // 放到第一个的就是默认值,譬如下面的hot
+                /*
+                'sort' => [                        // 所有排序方式
+                    // 下面的譬如hot  new  low-to-high 只能用 字母,数组,-,_ 这4种字符。
+                    'hot' => [
+                        'label'        => 'Hot',   // 显示的字符
+                        'db_columns'   => 'score', // 对应数据库的字段
+                        'direction'    => 'desc',  // 排序方式
+                    ],
+                    'review_count' => [
+                        'label'        => 'Review',   // 显示的字符
+                        'db_columns'   => 'review_count', // 对应数据库的字段
+                        'direction'    => 'desc',  // 排序方式
+                    ],
+                    'favorite_count' => [
+                        'label'        => 'Favorite',   // 显示的字符
+                        'db_columns'   => 'favorite_count', // 对应数据库的字段
+                        'direction'    => 'desc',  // 排序方式
+                    ],
+                    'new' => [
+                        'label'        => 'New',
+                        'db_columns'   => 'created_at',
+                        'direction'    => 'desc',
+                    ],
+                    'stock' => [
+                        'label'        => 'Stock',
+                        'db_columns'   => 'qty',
+                        'direction'    => 'desc',
+                    ],
+                    'low-to-high' => [
+                        'label'        => '$ Low to High',
+                        'db_columns'   => 'final_price',
+                        'direction'    => 'asc',
+                    ],
+                    'high-to-low' => [
+                        'label'        => '$ High to Low',
+                        'db_columns'   => 'final_price',
+                        'direction'    => 'desc',
+                    ],
+                ],
+                */
+                
+                 
+                  /*  
+                'price_range' => [
+                    '0-10',
+                    '10-20',
+                    '20-30',
+                    '30-50',
+                    '50-100',
+                    '100-150',
+                    '150-300',
+                    '300-500',
+                    '500-1000',
+                    '1000-',
+                ],
+            ],
+            */
+            //##############################
+            //# 		Product部分设置		 ##
+            //##############################
+            // 产品页面图片的设置
+            //'productImgSize' => [
+                //'small_img_width'  => 80,  // 底部小图的宽度
+                //'small_img_height' => 110,  // 底部小图的高度
+                //'middle_img_width' => 400,  // 主图的宽度
+           // ],
+            //'productImgMagnifier' => false, // 是否已放大镜的方式显示,如果否,则是内窥的方式查看
+
+            //##############################
+            //#     Review部分设置		 ##
+            //##############################
+            /*
+            'review' => [ 
+                'add_captcha'                    => true,  // 增加review页面是否开启验证码验证。
+                'productPageReviewCount'         => 10,    // 在产品页面显示的review的个数。
+                'reviewPageReviewCount'          => 20,    // 在review列表页面,显示的review的个数
+                'addReviewOnlyLogin'             => true,   // 只有登录用户才有资格进行评论。
+                'ifShowCurrentUserNoAuditReview' => true, // 当前用户添加的评论,后台未审核的评论,是否显示?这个是通过ip来判断。
+                'filterByLang'                   => false,    // 是否通过语言进行评论过滤?默认只显示当前的语言下的评论,也就是客户在添加评论的store的语言。
+            ],
+
+            'favorite' => [
+                'addSuccessRedirectFavoriteList' => false, // 产品收藏成功后是否跳转到账户中心的收藏列表
+            ],
+            */
+        ],
+    ],
+];

+ 56 - 0
appfront/config/fecshop_local_modules/Catalogsearch.php

@@ -0,0 +1,56 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    /**
+     * Catalogsearch 模块的配置,您可以在@appfront/config/fecshop_local_modules/Catalogsearch.php
+     * 中进行配置,二开,或者重写该模块(在上面路径中如果文件不存在,自行新建配置文件。)
+     */
+    'catalogsearch' => [
+        'class' => '\fecshop\app\appfront\modules\Catalogsearch\Module',
+        /**
+         * 模块内部的params配置。
+         */
+        'params'=> [
+            //'categorysearch_filter_attr' =>[
+            //	'color','size',
+            //],
+            // 搜索页面的title 格式 ,%s 将会被替换成搜索词
+            'search_page_title_format' => 'Search Text: %s ',
+            // 搜索页面的 meta keywords格式 ,%s 将会被替换成搜索词
+            'search_page_meta_keywords_format' => 'Search Text: %s ',
+            // 搜索页面的 meta description格式 ,%s 将会被替换成搜索词
+            'search_page_meta_description_format' => 'Search Text: %s ',
+            // 搜索的最大个数
+            'product_search_max_count'  => 1000,
+            // 搜索页面是否开启面包屑导航
+            'search_breadcrumbs'        => false,
+
+            //'search_filter_category' 	=> true,
+
+            'search_query' =>[
+                // 放到第一个的就是默认值,譬如下面的30
+                'numPerPage' => [30, 60, 90],        // 产品显示个数的列举
+
+                // 价格区间设置,如果不想在搜索页面价格过滤,可以清空这个。
+                'price_range' => [
+                    '0-10',
+                    '10-20',
+                    '20-30',
+                    '30-50',
+                    '50-100',
+                    '100-150',
+                    '150-300',
+                    '300-500',
+                    '500-1000',
+                    '1000-',
+                ],
+            ],
+        ],
+    ],
+];

+ 43 - 0
appfront/config/fecshop_local_modules/Cms.php

@@ -0,0 +1,43 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ *
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'cms' => [
+        'params'=> [
+        /*
+            'home_title'            => [
+                'home_title_en' => 'Fecshop Home Page En',
+                'home_title_zh' => 'Fecshop Home Page Zh',
+                'home_title_fr' => 'Fecshop Home Page Fr',
+                'home_title_es' => 'Fecshop Home Page Es',
+            ],
+            'home_meta_keywords'            => [
+                'home_meta_keywords_en' => 'Fecshop , Fashion E-Commerce Shop En',
+                'home_meta_keywords_zh' => 'Fecshop , Fashion E-Commerce Shop Zh',
+                'home_meta_keywords_fr' => 'Fecshop , Fashion E-Commerce Shop Fr',
+                'home_meta_keywords_es' => 'Fecshop , Fashion E-Commerce Shop Es',
+            ],
+
+            'home_meta_description'            => [
+                'home_meta_description_en' => 'Fashion E-Commerce Shop , Base On Yii2 Framework En',
+                'home_meta_description_zh' => 'Fashion E-Commerce Shop , Base On Yii2 Framework Zh',
+                'home_meta_description_fr' => 'Fashion E-Commerce Shop , Base On Yii2 Framework Fr',
+                'home_meta_description_es' => 'Fashion E-Commerce Shop , Base On Yii2 Framework Es',
+            ],
+            'homeBestSellerSku'        => [
+                'p10001-kahaki-xl', 'sk10003-001', 'sk10005', 'sk1000-khak', 'sk0003', 'men0003', 'men0002', 'men0001',
+            ],
+            'homeFeaturedSku'        => [
+                'men0003', 'men0002', 'men0001', 'computer001-xinghao2-cpu3', '22221', 'sk10005', 'sk1000-khak', '222212',
+            ],
+        */
+
+        ],
+    ],
+];

+ 14 - 0
appfront/config/fecshop_local_modules/Mytest.php

@@ -0,0 +1,14 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'mytest' => [
+        'class' => '\appfront\local\local_modules\Mytest\Module',
+
+    ],
+];

+ 1 - 0
appfront/config/fecshop_local_services/.gitignore

@@ -0,0 +1 @@
+!.gitignore

+ 49 - 0
appfront/config/fecshop_local_services/Cache.php

@@ -0,0 +1,49 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ *
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'cache' => [
+        /*
+         * 各个页面cache的配置
+         */
+        'cacheConfig'    => [
+            // 分类页面
+            'category'  => [
+                'timeout'         => 3600,    // 则设置缓存的过期时间,这里设置为秒
+                'disableUrlParam' => 'fecshop', // 如果开启缓存,在url加入什么参数后,系统不读取缓存,这个选项是为了方便在不刷新缓存的情况下,查看无缓存的页面是什么样子。
+                // url出现的这些参数的值,将参与cache唯一key的生成。
+                'cacheUrlParam'    => [
+                    // 分页,排序,等参数
+                    'p', 'dir', 'sort', 'numPerPage',
+                    // 侧栏属性过滤等参数
+                    'price', 'size', 'color',
+                    'style', 'dresses-length', 'pattern-type',
+                    'collar', 'xinghao', 'cpu',
+                ],
+            ],
+            // 产品页面
+            'product'  => [
+                'timeout'         => 3600,    //则设置缓存的过期时间,这里设置为秒
+                'disableUrlParam' => 'fecshop', // 如果开启缓存,在url加入什么参数后,系统不读取缓存,这个选项是为了方便在不刷新缓存的情况下,查看无缓存的页面是什么样子。
+            ],
+
+            // 首页页面
+            'home'  => [
+                'timeout'         => 3600,    // 则设置缓存的过期时间,这里设置为秒
+                'disableUrlParam' => 'fecshop', // 如果开启缓存,在url加入什么参数后,系统不读取缓存,这个选项是为了方便在不刷新缓存的情况下,查看无缓存的页面是什么样子。
+            ],
+
+            // Article(page)页面
+            'article'  => [
+                'timeout'         => 3600,    // 则设置缓存的过期时间,这里设置为秒
+                'disableUrlParam' => 'fecshop', // 如果开启缓存,在url加入什么参数后,系统不读取缓存,这个选项是为了方便在不刷新缓存的情况下,查看无缓存的页面是什么样子。
+            ],
+        ],
+    ],
+];

+ 23 - 0
appfront/config/fecshop_local_services/Event.php

@@ -0,0 +1,23 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ *
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'event' => [
+        'eventList' => [
+            /*
+            # 加入购物车前
+            'event_add_to_cart_before' => [
+                ['appfront\event\CartTest1','beforeAdd1'],
+                ['appfront\event\CartTest2','beforeAdd2'],
+            ],
+            */
+        ],
+
+    ],
+];

+ 46 - 0
appfront/config/fecshop_local_services/FecshopLang.php

@@ -0,0 +1,46 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ *
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'fecshoplang' => [
+        //'class' => 'fecshop\services\FecshopLang',
+        //  mongoSearchLangName 在各个语言下字段参考资料如下:(不支持中文)
+        //  https://docs.mongodb.com/manual/reference/text-search-languages/#text-search-languages
+        /*
+        'allLangCode' => [
+            // 'en_US' 是标准语言简码  code对应的值en取 “标准语言简码”的前两位字符,
+            // 该值设置后,进行了产品分类数据的添加后,不能修改,否则会出现部分翻译语言丢失。
+            'en_US' => [
+                'code'                    => 'en',
+            ],
+            'fr_FR' => [
+                'code'                    => 'fr',
+            ],
+            'de_DE' => [
+                'code'                    => 'de',
+            ],
+            'es_ES' => [
+                'code'                    => 'es',
+            ],
+            'ru_RU' => [
+                'code'                    => 'ru',
+            ],
+            'pt_PT' => [
+                'code'                    => 'pt',
+            ],
+            'zh_CN' => [
+                'code'                    => 'zh',
+            ],
+            'it_IT' => [
+                'code'                    => 'it',
+            ],
+        ],
+        */
+    ],
+];

+ 125 - 0
appfront/config/fecshop_local_services/Page.php

@@ -0,0 +1,125 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ *
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'page' => [
+        'childService' => [
+            //'widget' => [
+            //],
+            'asset' => [
+                'class' => 'fecshop\services\page\Asset',
+                // 在js后面加一个v参数,修改js后,更改v参数,否则,浏览器会使用缓存。
+                // /assets/dbdba3fa/js/js.js?v=2
+                'jsVersion'        => 2,
+                'cssVersion'       => 2,
+                /**
+                 * @var string the root directory string the published asset files.
+                 * 设置: js和css的发布路径
+                 * 譬如设置为:'@appimage/assets',也可以将 @appimage 换成绝对路径
+                 */
+                'basePath' => '@webroot/assets',
+                /**
+                 * @var string the base URL through which the published asset files can be accessed.
+                 * 设置: js和css的URL路径
+                 * 可以将 @web 换成域名 , 譬如  `http:://www/fecshop.com/assets`
+                 * 这样就可以将js和css文件使用独立的域名了【把域名对应的地址对应到$basePath】。
+                 */
+                'baseUrl' => '@web/assets',
+                
+                // js and css config example:
+                /**
+                 * 'jsOptions'	=> [
+                 *     # js config 1
+                 *     [
+                 *         'options' => [
+                 *             'position' =>  'POS_END',
+                 *         //	'condition'=> 'lt IE 9',
+                 *         ],
+                 *         'js'	=>[
+                 *             'js/my.js',
+                 *         ],
+                 *     ],
+                 *     # js config 2
+                 *     //[
+                 *     //    'options' => [
+                 *     //        'condition'=> 'lt IE 9',
+                 *     //    ],
+                 *     //    'js'	=>[
+                 *     //        'js/ie9js.js'
+                 *     //    ],
+                 *     //],
+                 * ],
+                 * # css config
+                 * 'cssOptions'	=> [
+                 *     # css config 1.
+                 *     [
+                 *         'css'	=>[
+                 *             'css/my.css',
+                 *         ],
+                 *     ],
+                 * 
+                 *     # css config 2.
+                 *     //[
+                 *     //    'options' => [
+                 *     //        'condition'=> 'lt IE 9',
+                 *     //    ],
+                 *     //    'css'	=>[
+                 *     //        'css/ltie9.css',
+                 *     //    ],
+                 *     //],
+                 * ],
+                 **/
+            ],
+
+            'menu' => [
+                'displayHome' => [
+                    'enable' => true,        // 是否在菜单中显示home
+                    'display'=> 'Home',        // 显示对应的字符。
+                ],
+                /*
+                 *	在菜单前面部分(产品分类菜单的前面部分)的自定义菜单。参考behindCustomMenu里面的格式
+                 */
+
+                'frontCustomMenu' => [
+
+                ],
+
+                /*
+                 *	在菜单后面部分(产品分类菜单的前面部分)的自定义菜单
+                 */
+                'behindCustomMenu' => [
+                    [
+                        'name'        => 'custom menu',            // 菜单名字
+                        'urlPath'     => '/my-custom-menu.html',    // 菜单对应的url
+                        'childMenu'   => [                        // 子菜单
+                            [
+                                'name'        => 'my custom menu 2',
+                                'urlPath'     => '/my-custom-menu-2.html',
+                            ],
+                            [
+                                'name'        => 'my custom menu 3',
+                                'urlPath'     => '/my-custom-menu-2.html',
+                                'childMenu'   => [
+                                    [
+                                        'name'        => 'my custom menu 3',
+                                        'urlPath'     => '/my-custom-menu-2.html',
+                                    ],
+                                    [
+                                        'name'        => 'my custom menu 3',
+                                        'urlPath'     => '/my-custom-menu-2.html',
+                                    ],
+                                ],
+                            ],
+                        ],
+                    ],
+                ],
+            ],
+        ],
+    ],
+];

+ 32 - 0
appfront/config/fecshop_local_services/Payment.php

@@ -0,0 +1,32 @@
+<?php
+/**
+ * FecShop file.
+ * @link http://www.fecshop.com/
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'payment' => [
+        'childService' => [
+            'alipay' => [
+                'devide'        => 'pc' ,  // 填写pc或者wap,pc代表pc机浏览器支付类型,wap代表手机浏览器支付类型 
+            ],
+        ],
+        'paymentConfig' => [        // 支付方式配置
+            'standard' => [            // 标准支付类型:在购物车页面进入下单页面,填写支付信息,然后跳转到第三方支付网站的支付类型。
+                
+                'wxpay_standard' => [
+                    'label'=> '微信支付',
+                    // 跳转开始URL
+                    'start_url'             => '@homeUrl/payment/wxpay/standard/start',
+                    // 支付完成后,跳转的地址。
+                    'return_url'            => '@homeUrl/payment/wxpay/standard/review',
+                    // 微信发送消息,接收的地址。
+                    'ipn_url'               => '@homeUrl/payment/wxpay/standard/ipn',
+                    'success_redirect_url'  => '@homeUrl/payment/success',
+                ], 
+            ],
+            
+        ],
+    ],
+];

+ 16 - 0
appfront/config/fecshop_local_services/Search.php

@@ -0,0 +1,16 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ *
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'search' => [
+        'filterAttr' => [
+            'color', 'size', // 在搜索页面侧栏的搜索过滤属性字段
+        ],
+    ],
+];

+ 9 - 0
appfront/config/fecshop_local_services/Store.php

@@ -0,0 +1,9 @@
+<?php
+   return [
+   'store' => [
+        'class'  => 'fecshop\services\Store',
+        
+
+    ],
+
+];

+ 14 - 0
appfront/config/fecshop_local_services/Url.php

@@ -0,0 +1,14 @@
+<?php
+/**
+ * FecShop file.
+ *
+ * @link http://www.fecshop.com/
+ *
+ * @copyright Copyright (c) 2016 FecShop Software LLC
+ * @license http://www.fecshop.com/license/
+ */
+return [
+    'url' => [
+        'showScriptName'=> false, // if is show index.php in url.  if set false ,you must config nginx rewrite
+    ],
+];

+ 30 - 0
appfront/config/fecshop_third.php

@@ -0,0 +1,30 @@
+<?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 处引入。
+ * 本配置文件为第三方插件库包的配置文件
+ */
+// read third config from $fecmall_db_extensions_data
+
+$third_config = [];
+$current_app_name = 'appfront';
+
+if (is_array($fecmall_db_extensions_data) && !empty($fecmall_db_extensions_data)) {
+    foreach ($fecmall_db_extensions_data as $one) {
+        $configFile = Yii::getAlias($one['config_file_path']);
+        $c = require($configFile);
+        $curr_config = isset($c['app'][$current_app_name]) ? $c['app'][$current_app_name] : false;
+        $app_enable = isset($curr_config['enable']) ? $curr_config['enable'] : false;
+        $app_config = isset($curr_config['config']) ? $curr_config['config'] : false;
+        if ($app_enable && is_array($app_config) && !empty($app_config)) {
+            $third_config = yii\helpers\ArrayHelper::merge($third_config, $app_config);
+        }
+    }
+}
+return $third_config;

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 80 - 0
appfront/config/main.php


+ 0 - 0
appfront/config/params.php


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels