levelshoes / module-shopfinder
包含 Graphql API 的简单 Shopfinder 模块
1.0.0
2023-06-26 11:06 UTC
Requires
- php: ~5.5.0|~5.6.0|7.*|8.*
README
安装步骤
- 将整个代码库复制到 app/code/
Levelshoes/Shopfinder
或者 - 使用 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
- 列出所有商店
选择你希望在 API 响应中列出的字段
ListShopsGraphql {
shopname
identifier
addresslineone
addresslinetwo
city
country
state
zipcode
phone
latitude
longitude
email
shopimage
status
cancollect
shopdescription
shopopentimedetail
storeview
}
}
- 通过 shop_id 获取商店
query {
ListShopsByStoreIDGraphql(shop_id:2) {
shopname
identifier
}
}
- 通过 shopid 更新商店
mutation {
editShopData(shop_id: 1, shopname: "test shop", status: 1, state: 0) {
status
message
}
}
注意:标志详情
Enabled : 1
Disabled : 0