PHPackages                             zks888/fecshop\_couchbase - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. zks888/fecshop\_couchbase

ActiveYii2-extension[Database &amp; ORM](/categories/database)

zks888/fecshop\_couchbase
=========================

fecshop cart use couchbase storage

1.0.2(7y ago)13BSD-3-ClausePHP

Since Nov 24Pushed 7y ago1 watchersCompare

[ Source](https://github.com/zks888/fecshop_couchbase)[ Packagist](https://packagist.org/packages/zks888/fecshop_couchbase)[ Docs](https://github.com/zks888/fecshop_couchbase)[ RSS](/packages/zks888-fecshop-couchbase/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/c678a96764528c513cf3ff0e257551e7178460e5db0f94d997ed3ccfc613f782/68747470733a2f2f706f7365722e707567782e6f72672f7a6b733838382f66656373686f705f636f756368626173652f762f737461626c65)](https://packagist.org/packages/zks888/fecshop_couchbase)[![Total Downloads](https://camo.githubusercontent.com/146a057e3b78c0de37bd8be82c28534bd3e60eacc612cd48d6eb67df3e860501/68747470733a2f2f706f7365722e707567782e6f72672f7a6b733838382f66656373686f705f636f756368626173652f646f776e6c6f616473)](https://packagist.org/packages/zks888/fecshop_couchbase)[![Latest Unstable Version](https://camo.githubusercontent.com/eebc2606312007ffcdf679a1d7e1dc5d66c8e459dd7abba7eb0a25b8634a3a43/68747470733a2f2f706f7365722e707567782e6f72672f7a6b733838382f66656373686f705f636f756368626173652f762f756e737461626c65)](https://packagist.org/packages/zks888/fecshop_couchbase)[![License](https://camo.githubusercontent.com/0043e315d2f69fe4c159e795c7c5e56af4c29ca1f8e6df7bb2c41ab0b7d24c4f/68747470733a2f2f706f7365722e707567782e6f72672f7a6b733838382f66656373686f705f636f756368626173652f6c6963656e7365)](https://packagist.org/packages/zks888/fecshop_couchbase)

Fecshop Couchbase购物车的实现

> fecshop 采用couchbase实现底层, 存储用户的cart信息。

安装
--

[](#安装)

```
composer require --prefer-dist zks888/fecshop_couchbase

```

or 在根目录的`composer.json`中添加

```
"zks888/fecshop_couchbase": "1.0.1"

```

然后执行

```
composer update

```

配置
--

[](#配置)

1.配置文件复制

将`vendor\zks888\fecshop_couchbase\config\fecshop_couchbase.php` 复制到 `@common\config\fecshop_third_extensions\fecshop_couchbase.php`(需要创建该文件)

该文件是扩展的配置文件，通过上面的操作，加入到fecshop的插件配置中

2.couchbase配置

[Couchbase 安装](https://github.com/matrozov/yii2-couchbase)

[Couchbase 中文资料](https://couchbase.shujuwajue.com/chapter1.html)

[Couchbase SDK-DOCTOR](https://github.com/couchbaselabs/sdk-doctor/releases/tag/v1.0.1)

[Couchbase 建索引](https://docs.couchbase.com/server/6.0/n1ql/n1ql-language-reference/createindex.html)

3.在couchbase中建立两个bucket，分别为：cart、item，

Access Control请选择Standard port (TCP port 11211. Needs SASL auth.) Enter password: 请不要设置

使用之前，请一定要先给cart建立cart\_id的索引，item建立cart\_id和product\_id的联合索引，

因为couchbase在bucket没有建索引的情况下，查询是会报错的

先在couchbase的终端管理后台执行：

```
CREATE PRIMARY INDEX `idx_version` ON `migration` (`version`);

CREATE INDEX `idx_version_applytime` ON `migration` (`version`, `apply_time`);

```

然后在@console\\config\\main.php里添加如下代码：

```

'controllerMap' => [

    'couchbase-migrate' => 'matrozov\couchbase\console\controllers\MigrateController',

],

```

最后就可以添加索引了

```

./yii couchbase-migrate  --interactive=0 --migrationPath=@fecshop/couchbase/migrations

```

4.然后，cart信息就存储到couchbase里面了，该扩展安装在路径 `vendor/zks888/fecshop_couchbase`下

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2726d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9b1f6ab929aee67ce5ff9007854ab32e11697c5639251d460d8f740ef41fb3c2?d=identicon)[zks888](/maintainers/zks888)

---

Top Contributors

[![zks888](https://avatars.githubusercontent.com/u/2533540?v=4)](https://github.com/zks888 "zks888 (4 commits)")

---

Tags

yii2fecshopcouchbase cart

### Embed Badge

![Health badge](/badges/zks888-fecshop-couchbase/health.svg)

```
[![Health](https://phpackages.com/badges/zks888-fecshop-couchbase/health.svg)](https://phpackages.com/packages/zks888-fecshop-couchbase)
```

###  Alternatives

[voskobovich/yii2-linker-behavior

This behavior makes it easy to maintain many-to-many and one-to-many relations in your ActiveRecord models.

80319.0k9](/packages/voskobovich-yii2-linker-behavior)[mootensai/yii2-relation-trait

Yii 2 Models load with relation, &amp; transaction save with relation

47220.3k9](/packages/mootensai-yii2-relation-trait)[nhkey/yii2-activerecord-history

Storage history of changes to ActiveRecord

46143.4k1](/packages/nhkey-yii2-activerecord-history)[dmstr/yii2-db

Database extensions

19618.8k6](/packages/dmstr-yii2-db)[spanjeta/yii2-backup

Database Backup and Restore functionality

285.0k1](/packages/spanjeta-yii2-backup)[craftcms/query

Execute database queries from the Control Panel

1614.5k1](/packages/craftcms-query)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
