hyva-themes / magento2-graphql-tokens
将客户和购物车令牌添加到CustomerData部分
1.0.4
2021-08-23 10:19 UTC
Requires
- magento/framework: *
- magento/module-catalog: >=103.0.0
- magento/module-checkout: >=100.3.0
- magento/module-customer: >=102.0.0
This package is auto-updated.
Last update: 2024-08-30 01:28:56 UTC
README
hyva-themes/magento2-graphql-tokens
本模块向CustomerData部分添加GraphQL令牌,以使从Magento模板发起GraphQL调用成为可能。
与Magento 2.3.4及以上版本兼容。
它做了什么?
它添加了
signin_token
到customer
部分cartId
到cart
部分storeViewCode
到cart
部分
CartId是用于访客购物车的掩码cartId
。需要storeViewCode
来在GraphQL请求中设置store-code。
登录后,客户可以使用signin_token
来获取真实购物车ID。
安装
- 通过composer安装
composer config repositories.hyva-themes/magento2-graphql-tokens git git@github.com:hyva-themes/magento2-graphql-tokens.git composer require hyva-themes/magento2-graphql-tokens
- 启用模块
bin/magento setup:upgrade
配置
无需配置。
它是如何工作的?
存在after-plugins
,它们将令牌添加到各个部分。
如果已存在令牌,则使用现有的一个。否则,将动态生成一个新的令牌。
致谢
许可证
MIT许可证(MIT)。有关更多信息,请参阅许可证文件。