landofcoder / module-productlabel-graphql
magento 2 product label graphql 扩展
1.0.0
2021-05-27 03:39 UTC
Requires
- landofcoder/module-productlabel: *
This package is auto-updated.
Last update: 2024-08-29 05:44:16 UTC
README
``lof/module-productlabelgraphql``
主要功能
magento 2 product label graphql 扩展
安装
* = 在生产环境中请使用 --keep-generated
选项
类型 1: 压缩文件
- 将压缩文件解压到
app/code/Lof
- 通过运行
php bin/magento module:enable Lof_ProductLabelGraphQl
启用模块 - 通过运行
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 lof/module-productlabelgraphql
安装模块 - 通过运行
php bin/magento module:enable Lof_ProductLabelGraphQl
启用模块 - 通过运行
php bin/magento setup:upgrade
应用数据库更新* - 通过运行
php bin/magento cache:flush
清除缓存
使用
- 产品查询中包含的标签
{
products(search: "Joust Duffle Bag", pageSize: 2) {
total_count
items {
name
sku
labels {
total_count
items {
entity_id
name
exclusively
use_for_parent
price_range_enabled
priority
product_custom_css
product_image
product_image_size
product_label_text
product_label_text
product_position
product_shape
product_stock_enabled
product_text_color
product_text_size
product_type
cat_custom_css
cat_image
cat_image_size
cat_label_color
cat_label_text
cat_position
cat_shape
cat_text_color
cat_text_size
cat_type
cond_serialize
customer_group_enabled
customer_group_ids
date_range_enabled
from_date
from_price
is_new
is_sale
special_price_only
status
stock_higher
stock_less
stock_more
stock_status
stores
to_date
to_price
by_price
}
}
}
page_info {
page_size
current_page
}
}
}
- 获取标签列表
{
lofProductLabelList(filter: {}, pageSize: 20, currentPage: 1) {
total_count
items {
entity_id
name
exclusively
use_for_parent
price_range_enabled
priority
product_custom_css
product_image
product_image_size
product_label_text
product_label_text
product_position
product_shape
product_stock_enabled
product_text_color
product_text_size
product_type
cat_custom_css
cat_image
cat_image_size
cat_label_color
cat_label_text
cat_position
cat_shape
cat_text_color
cat_text_size
cat_type
cond_serialize
customer_group_enabled
customer_group_ids
date_range_enabled
from_date
from_price
is_new
is_sale
special_price_only
status
stock_higher
stock_less
stock_more
stock_status
stores
to_date
to_price
by_price
}
}
}
捐赠
如果这个项目帮助您减少了开发时间,您可以请我喝一杯咖啡:)
我们的 Magento 2 扩展列表
特色 Magento 服务