aminkt / yii2-ordering-module
Yii2 ordering module for shopping sites
Installs: 18
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2024-11-09 15:45:00 UTC
README
How to install this module:
Step1: First add flowing codes into project composer.json
"repositories": [
{
"type": "gitlab",
"url": "https://gitlab.com/aminkt/yii2-ordering-module"
}
],
Then add flowing line to require part of composer.json
:
"aminkt/yii2-ordering-module": "*",
And after that run bellow command in your composer :
Composer update aminkt/yii2-ordering-module
Step2: Add flowing lines in modules part of your application config:
'ordering' => [
'class' => \aminkt\ordering\Order::className(),
'orderModelName' => models\Order::className(),
'orderItemModelName' => models\OrderItem::className(),
'customerProfileModelName' => models\Customer::className(),
'productModelName' => models\Product::className(),
],
step3: Add flowing lines in components part of your application config:
'order' => [
'class' => aminkt\ordering\components\Order::className(),
'orderModel'=> models\Order::className(),
'orderItemModel'=> models\OrderItem::className(),
],
Step4: Implement
OrderInterface
in your orders modelOrderItemInterface
in your orderItems modelCustomerProfileInterface
in you customer users modelProductInterface
in your products model
Step5: Enjoy from module.