landofcoder / module-seller-coupon-graph-ql
为卖家商品生成优惠券代码
1.0.2
2022-08-19 03:37 UTC
This package is auto-updated.
Last update: 2024-09-19 08:16:07 UTC
README
``landofcoder/module-seller-coupon-graph-ql``
主要功能
- 卖家优惠券
- 此模块允许卖家创建销售规则,通过电子邮件为客户生成优惠券代码
- 客户将购买卖家的产品,并应用其优惠券代码以获得折扣价格。
安装
* = 在生产环境中,请使用 --keep-generated
选项
类型 1:Zip 文件
- 将 zip 文件解压到
app/code/Lofmp
- 运行
php bin/magento module:enable Lofmp_CouponCodeGraphQl
启用模块 - 运行
php bin/magento setup:upgrade
应用数据库更新* - 运行
php bin/magento cache:flush
清除缓存
类型 2:Composer
- 将模块添加到 composer 存储库,例如
- 私有存储库
repo.magento.com
- 公共存储库
packagist.org
- 公共 GitHub 存储库作为 vcs
- 私有存储库
- 通过运行
composer config repositories.repo.magento.com composer https://repo.magento.com/
将 composer 存储库添加到配置中 - 运行
composer require landofcoder/module-seller-coupon-graph-ql
安装模块 composer - 运行
php bin/magento module:enable Lofmp_CouponCodeGraphQl
启用模块 - 运行
php bin/magento setup:upgrade
应用数据库更新* - 运行
php bin/magento cache:flush
清除缓存
查询
- 我的优惠券代码
{
myCouponCode (
type: "all
filters: {}
pageSize: 10
currentPage: 1
) {
total_count
items {
coupon_id
name
alias
code
from_date
to_date
uses_per_customer
discount_amount
type
times_used
created_at
expiration_date
coupon_rule {
rule_id
rule_name
discount_amount
}
seller_id
seller {
seller_id
shop_title
thumbnail
url
}
}
}
}
- 获取卖家公共优惠券代码
{
sellerCoupons (
sellerUrl: String!
filters: {}
pageSize: 5
currentPage: 1
) {
total_count
items {
coupon_id
name
alias
code
from_date
to_date
uses_per_customer
discount_amount
type
times_used
created_at
expiration_date
coupon_rule {
rule_id
rule_name
discount_amount
}
seller_id
seller {
seller_id
shop_title
thumbnail
url
}
}
}
}
- 获取公共优惠券代码
{
publicCouponCode (
type: String
filters: {}
pageSize: 5
currentPage: 1
) {
total_count
items {
coupon_id
name
alias
code
from_date
to_date
uses_per_customer
discount_amount
type
times_used
created_at
expiration_date
coupon_rule {
rule_id
rule_name
discount_amount
}
seller_id
seller {
seller_id
shop_title
thumbnail
url
}
}
}
}