Skip to content

Commit

Permalink
重新导入文件
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Jan 24, 2017
1 parent 421c821 commit dc5b1c1
Show file tree
Hide file tree
Showing 578 changed files with 52,386 additions and 0 deletions.
54 changes: 54 additions & 0 deletions LICENSE
@@ -0,0 +1,54 @@
The Fecshop is free software. It is released under the terms of the following OSL v.3.0 License.

Copyright (c) 2016, Terry
All rights reserved.


Open Software License ("OSL") v. 3.0

This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:

Licensed under the Open Software License version 3.0

1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:

1. to reproduce the Original Work in copies, either alone or as part of a collective work;

2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;

3. to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License;

4. to perform the Original Work publicly; and

5. to display the Original Work publicly.

2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.

3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.

4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.

5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).

6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.

7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.

8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.

9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).

10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.

11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.

12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.

13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.

14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.

16. Modification of This License. This License is Copyright (C) 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.

127 changes: 127 additions & 0 deletions README.md
@@ -0,0 +1,127 @@
<p>
<a href="http://fecshop.appfront.fancyecommerce.com/">
<img src="http://img.appfront.fancyecommerce.com/custom/logo.png">
</a>
</p>
<br/>

演示地址:http://fecshop.appfront.fancyecommerce.com/

Fecshop 全称为Fancy ECommerce Shop,是基于php Yii2框架之上开发的一款优秀的开源电商系统,遵循[OSL3.0协议](http://www.oschina.net/question/28_8527)
截止到2016-12-19号,除了支付部分,其他的基本都已经完成,关注fecshop的
在等2-3个月,也就是明年2,3月份,版本就可以出来,2017年4,5月份在把手机web
做一下,预计到明年5月份,后台,pc前台,手机web前台 ,命令控制台 这几个入口
基本可以完善,多谢大家关注和你们的Star,我会坚持把他写好。
目前由于项目还没有完成,因此,下载安装只能安装部分代码,
而且数据库部分没有提供migrate,也就是说,目前fecshop还不可用,
等代码开发完成,我在整体核对一遍代码,
然后把文档落实,该项目是开源项目,从事外贸电商6年来,
用了不少开源电商系统,譬如magento,发现开源框架都有一定
的诟病,在并发方面差,后期扩展,业务发展后期重构难,
尤其是现在的移动端的发展,多入口的电商模式占据主流,
性能方面的要求越来越高,Fecshop采用了nosql和mysql结合的方式,
关系型表放到mysql中,譬如优惠券,购物车,订单等,
非关系型数据表(非关系型代表不会出现多表强事务类型操作)
放到mongodb中,缓存用redis,搜索目前用的是mongodb的FullTextSearch功能,
支持一些主流语言的分词与搜索,不过目前不支持中文 切词 搜索,
后期扩展一下用ElasticSearch来进行搜索(ElasticSearch有中文插件,安装后支持中文分词)。


作者QQ:2358269014

github: https://github.com/fancyecommerce/yii2_fecshop

[![Latest Stable Version](https://poser.pugx.org/fancyecommerce/fecshop/v/stable)](https://packagist.org/packages/fancyecommerce/fecshop) [![Total Downloads](https://poser.pugx.org/fancyecommerce/fecshop/downloads)](https://packagist.org/packages/fancyecommerce/fecshop) [![Latest Unstable Version](https://poser.pugx.org/fancyecommerce/fecshop/v/unstable)](https://packagist.org/packages/fancyecommerce/fecshop)

**Fecshop文档(撰写中)**[Fecshop Doc Guide](http://www.fecshop.com/doc/fecshop-guide/cn-1.0/guide-index.html#)



项目状态:

> 项目已经开始,本项目由Terry筹划,预计到2017-05-01出来第一个正式版本。




1、安装Fecsop
------------

本部分为fecshop的核心代码部分,
是以yii2扩展的方式制作,因此,您安装入口库包`fecshop app advanced`
,通过`composer update`, 本部分代码会以依赖包的方式被加载安装。

点击这里,进入[安装 fecshop app advanced](https://github.com/fancyecommerce/yii2_fecshop_app_advanced)
页面。

2、架构特色
-----------

架构特色:参看详细介绍:[Fecshop 架构特色](http://www.fecshop.com/doc/fecshop-guide/cn-1.0/guide-fecshop-about-fecshop.html)

中文博客:[yii2 教程](http://www.fancyecommerce.com).

Fecshop 全称为Fancy ECommerce Shop,是一款优秀的开源电商系统,遵循[OSL3.0协议](http://www.oschina.net/question/28_8527)
目的是为了方便yii2用户快速的
开发商城,Fecshop作为一款可以持续性发展的商城系统,
在框架层面有以下特性:

1. 由于商城系统的复杂性,原始的框架MVC结构,显的有点力不从心,Fecshop框架
加入了[Block层](fecshop-feature-block.md)
Controller层只负责调度, Model只负责数据库映射,中间的处理逻辑由block来完成,View层
负责显示,这样各司其职, 以免造成controller文件过于庞大。

2. 加入[独立功能块](fecshop-feature-independent-block.md),有点类似Yii2的Widget,目的是为了让一些侧栏公用块
可以通过配置的方式
添加,同时,还可以具有设置缓存的功能,譬如侧栏的产品浏览记录,
newsletter等独立显示块可能在很多
页面用到,通过独立功能块可以配置方便的载入。

3. 在Model层的上层加入[服务层Services](fecshop-services-abc.md),这样,Controller,Block,View 层,在原则上
不能直接调用model,必须通过Services层以及子Services层,然后Services访问各个
model,组织数据,事务处理等操作,将数据结果返回给上层,这种设计可以方便以后业务
发展后,进而根据业务特点进行重构,或者以后如果出现新技术,新方式,
都重构成自己想要的样子,譬如,
将某个底层由mysql换成mongodb,或者为了应付高并发读写并且多事务性的功能部分,
进行分库分表的设计方式。

4. Fecshop[ 多模板系统](fecshop-feature-mutil-themes.md),Fecshop设置了多个模板路径,各个模板路径下的文件被加载
的优先级不同,其中,Fecshop的模板路径下的文件最全面,但是优先级最低,
,第三方模板路径优先级其次,用户本地模板路径优先级最高,
用户可以通过
复制相应路径下的view或者js,css文件到本地模板路径,存在于高优先级
模板路径的文件会被优先加载,这样用户可以通过多模板系统的原理进行模板的
制作,同时,不影响Fecshop模板的升级,如果Fecshop view文件升级后被修改,
那么用户可以比对本地模板文件与升级模板文件的代码的不同,
复制更改的代码到本地模板路径
即可。第三方的模板路径的优先级介于本地模板路径和Fecshop
模板路径之间。

5. [重写机制](fecshop-feature-rewrite.md),Fecshop的功能基本都可以被用户重写,包括servies层,Modules,
Controller,Block,Views,View Layout,
以及Js Css Img等,都可以被用户重写,其中 Js,Css,Img,Views,View Layout
是通过多模板
路径优先级来实现的,其他的是通过配置文件的覆盖更改来实现重写,这样,用户
就可以很方便重构Fecshop或者第三方的功能和模板。

6. 升级最小化干扰,Fecshop的核心文件是放到vendor/fancyecommerce/fecshop
路径下面,和第三方扩展,用户二次开发路径完全隔离开,
Fecshop可以通过composer进行核心功能的升级,用户只需要通过composer升级
即可。

7. 快速高效,[Fecshop Servises](fecshop-services-abc.md)遵循Yii2的懒加载方式,只初始化使用到的组件服务,
缓存方面有整页缓存,block部分缓存,动态数据ajax加载等方式,让您的网站快速响应。

8. [Fecshop 多入口模式](fecshop-feature-mutil-entrances.md),分为 appadmin(后台), appfront(PC前端),apphtml5(手机web),
appserver(手机app服务),appapi(erp,或者其他接口对接),
不同的业务,不同的设备,进入不同的入口,各个入口共用服务层services,
但是modules部分独立,这样相互干扰最小,可以相互独立开发。

9. 后台封装化,fec_admin扩展可以快速的实现增删改查类型的表单列表,
方便用户快速的做增删改查。

鉴于以上特点,您可以下载安装fecshop,然后更改fecshop的模板和功能,扩展自己想要
的功能,或者安装第三方开发好了的扩展或者模板,来快速的组建起来您的网站。


38 changes: 38 additions & 0 deletions app/appadmin/config/appadmin.php
@@ -0,0 +1,38 @@
<?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的核心模块
$modules = [];
foreach (glob(__DIR__ . '/modules/*.php') as $filename){
$modules = array_merge($modules,require($filename));
}
return [
'modules'=>$modules,
/* only config in front web */
//'bootstrap' => ['store'],
'components' => [
'user' => [
'identityClass' => 'fecadmin\models\AdminUser',
'enableAutoLogin' => true,
],

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

'urlManager' => [
'rules' => [
'' => 'fecadmin/index/index',
],
],
],
'params' => [
'appName' => 'appadmin',
],
];
14 changes: 14 additions & 0 deletions app/appadmin/config/modules/Catalog.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 [
'catalog' => [
'class' => '\fecshop\app\appadmin\modules\Catalog\Module',

],
];
16 changes: 16 additions & 0 deletions app/appadmin/config/modules/Cms.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 [
'cms' => [
'class' => '\fecshop\app\appadmin\modules\Cms\Module',
'params'=> [

],
],
];
16 changes: 16 additions & 0 deletions app/appadmin/config/modules/Customer.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 [
'customer' => [
'class' => '\fecshop\app\appadmin\modules\Customer\Module',
'params'=> [

],
],
];

0 comments on commit dc5b1c1

Please sign in to comment.