获取Shopware PWA中所有品种的可用库存(Next.js)
我正在使用Shopware PWA,并创建了自己的按钮来选择颜色和尺寸。我想在库存为空时更改按钮的样式,但是我一生无法找到所有可以获取所有品种的库存。我在swproductdetails.vue
中,尝试了product
和getoptionGroups
refs,但我只能找到当前选择的stock 。我在哪里可以找到所有可用的库存?
在Shopware Admin面板的默认出口前端中,它确实显示了空库存的按钮不同的按钮,但我不知道在Shopware PWA模块中查找库存的位置。
问候
I am using Shopware PWA and created my own buttons for selecting a colour and size. I want to changed the style of a button when stock is empty, but I can't for the life of me find where to get all stock of the varieties. I'm in the SwProductDetails.vue
and tried the product
and the getOptionGroups
refs, but I can only find the stock of the currently selected variety. Where do I find all available stock?
In the default exported frontend from the shopware admin panel it does show the buttons with a different style for empty stock, but I don't know where to look for the stock in the ShopWare PWA module.
Regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能可以使用
iuseaddtocart
interface/api提供
getavailableStock
方法。You might be able to use the
IUseAddToCart
interface / APIwhich provides an
getAvailableStock
method.