robote13 / yii2-catalog
在线商店产品目录。价格、套餐、仓库剩余。在模块中,使用“类表继承”设计模式来表示不同类型的产品。
v0.3.2
2017-10-26 01:34 UTC
Requires
- kartik-v/yii2-editable: @stable
- kartik-v/yii2-widget-select2: @dev
- robote13/countries-list: *
- robote13/yii2-components: *
- sidanval/yii2-tabular: dev-master
- voskobovich/yii2-linker-behavior: dev-master
- vova07/yii2-fileapi-widget: dev-feature-flysystem
- vova07/yii2-imperavi-widget: dev-master
- wbraganca/yii2-dynamicform: dev-master
- yiisoft/yii2: ^2.0.10
- yiisoft/yii2-bootstrap: ~2.0.0
Requires (Dev)
- yiisoft/yii2-faker: ~2.0.0
This package is not auto-updated.
Last update: 2024-09-12 18:10:04 UTC
README
在线商店产品目录。价格、套餐、仓库剩余。在模块中,使用“类表继承”设计模式来表示不同类型的产品。
升级
目前该包处于开发初期。更新时,请仔细阅读CHANGELOG.md文件
安装
通过composer安装此扩展是首选方式。
运行以下命令:
php composer.phar require --prefer-dist robote13/yii2-catalog "^0.3.0"
或者添加以下内容到你的composer.json
文件的require部分:
"robote13/yii2-catalog": "^0.3.0"
使用方法
模块连接
'modules' => [ 'backend'=>[ 'modules'=>[ 'shop-catalog' => [ 'class' => 'robote13\catalog\Module', 'controllerNamespace' => 'robote13\catalog\backend\controllers', ], ] ], 'shop-catalog' => [ 'class' => 'robote13\catalog\Module' ], ],
为徽章设置存储
所有存储操作都通过抽象文件系统Flysystem进行。对于模块,默认的文件系统组件名为:catalogPreviews
(见robote13\catalog\Module::previewUploaderOptions
)
'components' => [ 'catalogPreviews'=>function(){ $adapter = new League\Flysystem\Adapter\Local(Yii::getAlias('@app/web/catalog-previews')); return new \League\Flysystem\Filesystem($adapter); } ]