Open-source project
fecshop/yii2_fecshop avatar
fecshop/yii2_fecshop

Yii2 Fecshop (FecMall): a PHP ecommerce core for engineers who want to fork, not configure

yii2 ( PHP ) fecmall(fecshop) core code used for ecommerce shop 多语言多货币多入口的开源电商 B2C 商城,支持移动端vue, app, html5,微信小程序微店,微信小程序商城等

5,263 stars1,395 forksPHPBSD-3-Clause

At a glance

What is it?
Fecshop, now branded FecMall, is a BSD-3-Clause Yii2 ecommerce core with six entry points and a service layer between controllers and models. It is a framework-shaped shop, so the install runs through composer and the real cost is the second-development work that follows.
Who is it for?
Adopt Fecshop if your team writes PHP and Yii2 daily and you intend to own the codebase, because the README positions it as a framework for programmers rather than a click-to-configure product. Do not adopt it if you need a hosted control panel, a multi-tenant SaaS model, or a shop you never open in an editor; the README describes no such mode.
Can I use it commercially?
Yes. BSD-3-Clause is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 25 days ago.
What is it written in?
Mainly PHP, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What Fecshop solves, and the kind of team it assumes

Fecshop, whose full name the README gives as Fancy ECommerce Mall and which has been renamed FecMall, is a PHP ecommerce system built on top of the Yii2 framework. The stated audience is narrow and explicit: the README says it is suited to programmers who want to study and extend it, and that second development is comparatively easy. That sentence is the whole positioning. This is not a product where a merchant signs up and configures a storefront. It is a codebase you install, then modify.

The problem it addresses is the gap between a general web framework and a working shop. Yii2 gives you routing, ActiveRecord, and a widget system, but no cart, no product model, no multi-currency pricing, and no admin. Fecshop supplies those as an application skeleton with its own layering conventions. The README lists six completed entry points: appfront for PC, apphtml5 for mobile web, appadmin for the back office, appserver for the Vue front end, appapi for ERP and other third-party integrations, and console for background scripts. A team that wants a Chinese-market B2C shop with a mobile web and a WeChat mini-program front end gets all of those paths from one install instead of assembling them.

The trade-off is visible in the same paragraph. Because the project describes itself as leaning toward a framework, adopting it means adopting its file layout, its service conventions, and its upgrade model. You are not buying a product with a support contract; you are taking on a codebase.

The service layer, the Block layer, and why the controllers stay thin

The architecture section of the README is the most useful part of the document, because it explains decisions that would otherwise look like over-engineering. Plain MVC, the README argues, becomes strained in a shop, so Fecshop inserts a Block layer. Controllers only dispatch. Models only map to the database. The processing logic sits in blocks, and views render. The stated goal is to stop controller files from growing without limit, which is a familiar failure mode in Yii2 commerce code.

Above the model layer sits Services, and the rule is strict: controllers, blocks, and views are not supposed to call models directly. They go through services and sub-services, and services reach the models, assemble data, handle transactions, and return results upward. The README justifies this as future-proofing. If you later want to move part of the storage from MySQL to MongoDB, or shard a table that takes heavy concurrent writes, the change is contained in the service layer rather than spread across every controller. That is a real benefit and also a real cost: every simple read now has a service method behind it, and a developer who does not follow the convention will produce code the next maintainer cannot trace.

The entry-point split reinforces the same idea. All six entries share the service layer but keep their modules separate, so appfront and appserver can evolve without stepping on each other. For a team shipping a PC site and a Vue app from one backend, that separation is the point.

Installing Fecshop with composer, and a first look at the demo entries

The README is emphatic about one thing: Fecshop installs online through composer, and cloning the repository directly does not work. The install instructions themselves live in a separate graphical install guide on the project site, so the details below come from what the README does state rather than from a complete walkthrough.

The package is published on Packagist under the name fancyecommerce/fecshop, which is what the README's badges point to. That is the identifier to require, and the repository's composer.json is the other place to confirm it:

json
{
  "require": {
    "fancyecommerce/fecshop": "~2.17.4"
  }
}

What you should see is composer resolving the package and its Yii2 dependencies into your vendor directory. The README notes that core files land under vendor/fancyecommerce/fecshop, deliberately separated from third-party extensions and from your own second-development code, so that composer can upgrade the core without touching your work. If composer reports a dependency conflict, the README's answer is the install guide, not a manual download.

Before installing anything, the fastest way to judge fit is the set of hosted demos the README lists. The PC demo is at fecshop.appfront.fancyecommerce.com, the mobile web demo at fecshop.apphtml5.fancyecommerce.com, and the Vue front end, which the README describes as a fully separated front and back end, at demo.fancyecommerce.com. There is also a WeChat mini-program demo that the README says can be found by searching for Fecmall in WeChat. Walking those four surfaces tells you more about the template system and the checkout flow than any feature list.

For the back office, the README points to a demo thread at fecmall.com/yanshi rather than a direct URL, so the admin demo is one click further away than the storefront demos.

Multi-template paths and the rewrite mechanism, and where they bite

Two mechanisms carry most of the customization work, and both are documented in enough detail to plan around. The first is the multi-template system. Fecshop defines several template paths with different load priorities. The Fecshop template directory holds the most complete set of files but has the lowest priority. Third-party template paths sit in the middle. Your local template path has the highest priority. To change a view, a JavaScript file, or a CSS file, you copy it into your local path and edit the copy; the higher-priority file wins. The README frames this as an upgrade-safety feature, and it is: when a core view changes in a new release, you diff your local copy against the updated original and port only the changed lines.

The second is the rewrite mechanism. Services, modules, controllers, blocks, views, view layouts, and static assets can all be overridden. Views, layouts, JS, CSS, and images are overridden through the template priority system. Everything else is overridden through configuration file replacement. The README presents this as making it easy to refactor Fecshop or a third-party extension.

The limitation is the one that follows from any copy-and-override system: your local template path accumulates forks of core files, and each core upgrade turns into a diff review. The README acknowledges this directly when it tells you to compare local files with upgraded ones. That is manual work, and it scales with how much of the template you have touched. A team that copies twenty views into the local path has twenty files to reconcile on every release that changes those views.

Where Fecshop is the wrong choice

The clearest boundary is the one the project draws itself. The README says Fecshop is a complete open-source ecommerce system that leans toward a framework and suits programmers who want to study it. Nothing in the document describes a no-code or low-code path to a running shop. If your team has no PHP or Yii2 experience, the service layer convention, the Block layer, and the configuration-based rewriting are obstacles rather than features, and the graphical install guide will get you a running demo but not a store you can maintain.

The second boundary is hosting and tenancy. The README describes six entries and a shared service layer, all within one application. It does not describe multi-tenant operation, per-merchant isolation, or a hosted control panel. A project that needs those has to build them on top, which means the framework-shaped design is now working against you rather than for you.

The third is release cadence as a signal. The most recent release listed is 2.17.4 from 2021-09-02, while the last push to the repository was on 2026-09-05. Those two facts pull in different directions, and the README does not explain the gap between tagged releases and ongoing commits. Anyone planning to depend on versioned releases should read the commit history and the forum before assuming the tag is the current state of the code. The project's own bug tracker and question channel is the forum at fecmall.com/topic, which is where the README sends you for bugs and questions.

One more thing to check before committing: the README states that Fecmall 2.x made many user-experience improvements and advises installing the 2.x version, with 1.x documented separately in README-1.X.MD. Confirm which line you are starting on before you write any code.

How Fecshop differs from a multi-merchant PHP shop platform

The obvious alternative for a PHP team is a multi-merchant platform such as Shopxo, which appears in the related searches for this project. The difference in approach is structural rather than cosmetic. A multi-merchant platform starts from the assumption that many independent sellers share one installation, so tenant isolation, per-seller settlement, and seller-facing administration are first-class concerns. Fecshop starts from the assumption that one operator runs one B2C store, and the README's six entry points are all oriented around that operator: PC, mobile web, Vue app, mini-program, ERP integration, and console scripts.

That means the comparison is not about feature counts. If your business model is a marketplace, you would be adding tenancy to Fecshop from scratch, and the service layer will not help you, because it was designed to organize one shop's data rather than to partition many shops' data. If your business model is a single-brand B2C store where you control the front end and the back office, Fecshop's layering is a better match, and a multi-merchant platform would leave you carrying seller infrastructure you never use.

The same logic applies against a plain Yii2 application. Choosing Yii2 alone means building the cart, the multi-currency pricing, the admin scaffolding, and the template priority system yourself. Choosing Fecshop means inheriting those plus the conventions that come with them. The README's own framing, that the project is a framework-leaning system built so Yii2 users can quickly develop a shop, is an accurate summary of which side of that line it sits on.

Licence, upgrade cost, and what composer does and does not protect

Fecshop is released under BSD-3-Clause, the same licence the README notes Yii2 uses. The README also links to a separate Fecmall authorization agreement on the project site, which is worth reading alongside the repository LICENSE file, since the two are not described as identical documents. This is a description of what the repository states, not legal advice; if the distinction matters to your organisation, take it to counsel rather than to a README.

The upgrade story is one of the better-considered parts of the design. Core files live under vendor/fancyecommerce/fecshop, isolated from third-party extensions and from your own code, and the README says the core can be upgraded through composer. In principle that means an upgrade is a composer command plus a diff review of any core files you forked into your local template path. In practice the diff review is the cost, and it grows with the number of views, layouts, and assets you have copied. The rewrite mechanism through configuration files has a similar profile: configuration overrides are easier to reconcile than file copies, but they still need checking when the underlying service changes.

What composer does not protect is your own second-development code. The README does not document rollback, does not describe a migration path between major versions, and does not state a support window for the 2.x line. If you are planning a multi-year deployment, those silences matter more than the licence.

Editorial conclusion

Adopt Fecshop if your team writes PHP and Yii2 daily and you intend to own the codebase, because the README positions it as a framework for programmers rather than a click-to-configure product. Do not adopt it if you need a hosted control panel, a multi-tenant SaaS model, or a shop you never open in an editor; the README describes no such mode. Before committing, verify three things against the live documentation: that the graphical install guide completes on your PHP and MySQL versions, that the appserver entry actually serves the Vue front end you plan to ship, and that the template and rewrite mechanisms cover the pages you intend to change. The last push to the repository was on 2026-09-05, so check the current commit history and the forum before you plan an upgrade path around the 2.17.4 tag from 2021.

Frequently asked questions

Is Yii still relevant for a project like Fecshop?

Fecshop is built on the Yii2 framework and follows Yii2 conventions such as lazy-loaded services and widgets, so the framework's relevance to you depends on whether your team already works in it. The README positions the project specifically as a way for Yii2 users to build a shop quickly, which means its value is highest for teams already inside that ecosystem.

Can I install Fecshop by cloning the GitHub repository?

No. The README states that Fecshop installs online through composer and that a direct git clone will not work, and it directs you to the graphical install guide on the project site for the full procedure.

What entry points does Fecshop provide out of the box?

The README lists six completed entries: appfront for PC, apphtml5 for mobile web, appadmin for the back office, appserver for the Vue front end, appapi for ERP and third-party integration, and console for background scripts. They share the service layer but keep their modules separate.

How do I change a Fecshop template without breaking future upgrades?

The README describes a multi-template system with load priorities: the Fecshop template path has the lowest priority, third-party paths sit in the middle, and your local path has the highest. You copy the view, JS, or CSS file into your local path and edit the copy, so a core upgrade leaves your version untouched and you port only the changed lines.

Does Fecshop support multiple merchants in one installation?

The README does not describe multi-tenant operation. Its six entry points are oriented around a single B2C operator, and the service layer is presented as a way to organize one shop's data rather than to partition many shops' data.

Official sources

  1. fecshop/yii2_fecshop on GitHub
  2. License: BSD-3-Clause
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/fecshop-yii2-fecshop.svg)](https://hysenlabs.com/projects/fecshop-yii2-fecshop)