获取Shopware PWA中所有品种的可用库存(Next.js)

发布于 2025-02-13 20:14:15 字数 308 浏览 0 评论 0原文

我正在使用Shopware PWA,并创建了自己的按钮来选择颜色和尺寸。我想在库存为空时更改按钮的样式,但是我一生无法找到所有可以获取所有品种的库存。我在swproductdetails.vue中,尝试了productgetoptionGroups 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

短暂陪伴 2025-02-20 20:14:15

您可能可以使用

iuseaddtocart interface/api

提供getavailableStock方法。

You might be able to use the

IUseAddToCart interface / API

which provides an getAvailableStock method.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文