CoCart - 在哪里可以找到或制作新的购物车钥匙?
我正在尝试使用 Woocommerce 和 CoCart 制作一个应用程序。 CoCart 用于购物车项目。当我尝试使用 JWT 添加更新和删除时,它工作正常。但是对于访客用户该怎么办呢?
所以我读到您可以在参数中使用 cart_key 。但是,我是否需要制作自己的 cart_key,例如:“12345”,或者更好地使用随机字符和数字生成器?
或者,当您将第一个项目放入卡中并且在没有 JWT 的情况下调用端点时,CoCart 是否会为您提供 cart_key ? (我尝试过这个,但是如果我没有在没有 JWT 的情况下放置 cart_key,我会收到一条错误消息。
你有什么经验吗? 谢谢!
I am trying to make an app using Woocommerce and CoCart. CoCart is used for the cart items. It works fine when I am trying to add update and delete with JWT. But what to do with guest users?
So I read that you can use a cart_key in the params. However, do I need to make my own cart_key like: '12345' or even better use a random character and number generator?
Or does CoCart gives you a cart_key when you put in a first item in the card and you call the endpoint without a JWT? (I tried this but if I do not put a cart_key without JWT I get an error message.
Do you have any experience?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论