ronash-dhakal / yii2-coupon
Discount Coupon Yii2
Installs: 24
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=7.0
- johnitvn/yii2-ajaxcrud: *
- kartik-v/yii2-editable: *
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2025-03-12 03:50:45 UTC
README
Discount Coupon Yii2
In Active Development.
+++ TODO +++
- DB Migration
- Products Model Mapping
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist ronash-dhakal/yii2-coupon "*"
or add
"ronash-dhakal/yii2-coupon": "*"
to the require section of your composer.json
file.
Database
CREATE TABLE `coupon` (
`id` int(11) NOT NULL,
`name` varchar(200) NOT NULL,
`expire_on` date NOT NULL,
`current_use` int(11) NOT NULL DEFAULT '0',
`total_use` int(11) NOT NULL DEFAULT '0',
`description` varchar(255) DEFAULT NULL,
`active` tinyint(4) NOT NULL DEFAULT '1',
`public` tinyint(4) NOT NULL DEFAULT '1',
`has_condition` tinyint(4) NOT NULL DEFAULT '0',
`filter_by` varchar(50) DEFAULT NULL,
`min_price` double DEFAULT NULL,
`max_price` double DEFAULT NULL,
`discount` float NOT NULL,
`products` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Usage
Once the extension is installed, add following code to config module :
<?= [ 'coupon' => [ 'class' => 'ronash\coupon\module', ], ] ?>```