landofcoder/module-recent-viewed-products-graph-ql
最新稳定版本:1.0.0
Composer 安装命令:
composer require landofcoder/module-recent-viewed-products-graph-ql
包简介
Magento 2 Recent Viewed Products Graph Ql
README 文档
README
Magento 2 recent viewed products graph ql module. Allow submit recent viewed product ids, get recent viewed product collection
This module require admin enable recent viewed report in admin > stores > configuration > General > Report
Installation
* = in production please use the --keep-generated option
Type 1: Zip file
- Unzip the zip file in
app/code/Lof - Enable the module by running
php bin/magento module:enable Lof_RecentViewedGraphQl - Apply database updates by running
php bin/magento setup:upgrade* - Flush the cache by running
php bin/magento cache:flush
Type 2: Composer
- Make the module available in a composer repository for example:
- private repository
repo.magento.com - public repository
packagist.org - public github repository as vcs
- private repository
- Add the composer repository to the configuration by running
composer config repositories.repo.magento.com composer https://repo.magento.com/ - Install the module composer by running
composer require landofcoder/module-recent-viewed-products-graph-ql - enable the module by running
php bin/magento module:enable Lof_RecentViewedGraphQl - apply database updates by running
php bin/magento setup:upgrade* - Flush the cache by running
php bin/magento cache:flush
Grqph Ql Queries
- Query - Get recent viewed products of current logged in customer
Query:
{
recentViewedProducts(search: "", pageSize: 5, currentPage: 1) {
total_count
currentPage
pageSize
totalPages
items {
id
sku
uid
name
url_key
price_range {
minimum_price {
regular_price {
value
currency
}
}
}
image {
url
label
}
}
}
}
search: string - search by keyword
- Mutation - Submit recent viewed product ids of current logged in customer
Query:
mutation {
recentViewedProducts(product_ids: [Int]!)
{
message
total_count
}
}
product_ids: [Int]! - required field, array of product ids
统计信息
- 总下载量: 4.61k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: OSL-3.0
- 更新时间: 2022-09-27