levelshoes/module-shopfinder

包含 Graphql API 的简单 Shopfinder 模块

安装: 5

依赖: 0

建议: 0

安全: 0

星级: 0

关注者: 1

分支: 0

开放问题: 0

类型:magento2-module

1.0.0 2023-06-26 11:06 UTC

This package is auto-updated.

Last update: 2024-09-26 13:46:39 UTC


README

安装步骤

  1. 将整个代码库复制到 app/code/Levelshoes/Shopfinder
    或者
  2. 使用 composer : composer require krunal/module-shopfinder

执行上述步骤后,请运行以下命令

php bin/magento module:enable Levelshoes_Shopfinder
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f

GraphQL API 请求示例

URL : storeurl/graphql

  1. 列出所有商店
    选择你希望在 API 响应中列出的字段
  ListShopsGraphql {
    shopname
    identifier
    addresslineone
    addresslinetwo
    city
    country
    state
    zipcode
    phone
    latitude
    longitude
    email
    shopimage
    status
    cancollect
    shopdescription
    shopopentimedetail
    storeview
  }
}
  1. 通过 shop_id 获取商店
query {
  ListShopsByStoreIDGraphql(shop_id:2) {
    shopname
    identifier
  }
}
  1. 通过 shopid 更新商店
mutation {
  editShopData(shop_id: 1, shopname: "test shop", status: 1, state: 0) {
    status
    message
  }
}

注意:标志详情

Enabled : 1
Disabled : 0