Commerce.js API 响应中缺少产品属性
我在发送请求以从 Commerce.js API 获取产品时遇到问题。
我无法从该服务提供的 UI 中检索为每个产品设置的属性列表。
产品属性
API 响应
在 API 文档,显示可以获取每个产品的属性。
否则,您能否建议任何高度可定制的 Commerce.js 替代方案?
I've had an issue when sending requests to fetch products from the Commerce.js API.
It's that I cannot retrieve the list of attributes I set for each product from the UI that this service provides.
Product Attributes
API Response
In the API docs, it is shown that it's possible to fetch the attributes of each product.
Otherwise, would you please suggest any alternative to Commerce.js that is highly customizable?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到了同样的问题。如果您使用Commerce SDK,我一开始就尝试过,但似乎它不会返回属性。取而代之的是,您可以尝试使用秘密键使用Fetch API检索产品。对我有用
I had the same problem. In case you used Commerce SDK, I tried that at first but it seems that it doesn't return the attributes. Instead you can try retrieving the products using the fetch API with the secret key. That worked for me
确保属性本身设置为可见,默认情况下是无法获取的
Make sure the Attribute itself set to Visible, it's by default Private that can't be fetched