pistol88 / yii2-micro-shop
yii2-shop it's a module for site micro-shop backend
Installs: 34
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=5.4.0
- 2amigos/yii2-grid-view-library: *
- kartik-v/yii2-widget-select2: *
- league/flysystem: *
- pistol88/yii2-field: *
- pistol88/yii2-gallery: *
- trntv/yii2-file-kit: @stable
- yiisoft/yii2: *
- yiisoft/yii2-bootstrap: *
Requires (Dev)
This package is auto-updated.
Last update: 2024-10-27 22:18:33 UTC
README
Модуль представляет из себя бекенд для очень маленького Интернет-магазина.
Установка
php composer require pistol88/yii2-shop
Миграция:
php yii migrate --migrationPath=vendor/pistol88/yii2-micro-shop/migrations
Настройка
//ALTER TABLE shop_product
ADD price
DECIMAL( 11, 2 ) NULL ;
//ALTER TABLE shop_incoming
ADD price
DECIMAL( 11, 2 ) NULL ,
ADD product_id
INT( 11 ) NULL ,
ADD amount
INT( 11 ) NULL ;
В конфиг (скорее всего, bootstrap.php) добавить:
Yii::setAlias('@storageUrl','/frontend/web/images');
В секцию modules конфига добавить:
'modules' => [
//..
'microshop' => [
'class' => 'pistol88\microshop\Module',
'adminRoles' => ['administrator'],
],
'gallery' => [
'class' => 'pistol88\gallery\Module',
'imagesStorePath' => dirname(dirname(__DIR__)).'/storage/web/images/store',
'imagesCachePath' => dirname(dirname(__DIR__)).'/storage/web/images/cache',
'graphicsLibrary' => 'GD',
'placeHolderPath' => dirname(dirname(__DIR__)).'/storage/web/images/placeHolder.png',
],
//..
]