定制 landofcoder/module-recent-viewed-products-graph-ql 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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
  • 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

  1. 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

  1. 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

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2022-09-27