magento 捆绑产品显示缺货

发布于 2024-10-08 02:05:18 字数 228 浏览 0 评论 0原文

我在 Magento 1.4.0.1 中创建了一个捆绑产品。 捆绑包的所有组件都有库存,但当捆绑包显示在前端时,却显示缺货? 如何让该产品显示“有库存”?

在管理系统中,没有为捆绑包添加库存的选项,所以我猜库存水平是根据组件计算出来的(如果有的话?) - 也许使用组件项目的最低库存数作为整个捆绑包的库存水平的依据?

我真的不希望这种情况发生(如果是的话?)。 我只需要将捆绑包显示为有库存。 有人可以帮忙吗?

I have created a bundle product in Magento 1.4.0.1.
All the components of the bundle are in stock but when the bundle is displayed on the front end, it shows as out of stock?
How do I get that product to display "in stock"?

In the admin system, there isn't an option to add inventory for the bundle, so I guess the stock level is worked out from the component parts (if at all?) - perhaps using the lowest stock count of a component item as the basis for the stock level of the entire bundle?

I really don't want that to happen (if it is?).
I just need the bundle to display as in stock.
Can anyone help?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

瘫痪情歌 2024-10-15 02:05:18

是的,捆绑包的库存水平是根据捆绑包项目中所需的每个选项的选择来计算的。如果您想更改该行为,则需要重写 Mage_Bundle_Model_Product_Type 类中的 isSalable($product) 函数,以便它返回 true

您可以通过使用扩展 Mage_Bundle_Model_Product_Type 的模型创建自己的模块来实现这一点,并且在 config.xml 中您将需要:

<global>
    <models>
        <modulename>
            <class>Namespace_Modulename_Model</class>
        </modulename>
        <bundle>
            <rewrite>
                <product_type>Namespace_Modulename_Model_Product_Type</product_type>
            </rewrite>
        </bundle>
    </models>
....
</global>

显然,危险在于您销售的商品数量会超过库存供应量,所以这需要是一个商业决策......

Yup, the stock level for a bundle is calculated from the selections for each of the options that are required within the bundle items. If you want to change that behaviour, you will need to override the isSalable($product) function within the Mage_Bundle_Model_Product_Type class so that it is return true.

You can do that by creating your own module with a Model that extends Mage_Bundle_Model_Product_Type and in the config.xml you will need:

<global>
    <models>
        <modulename>
            <class>Namespace_Modulename_Model</class>
        </modulename>
        <bundle>
            <rewrite>
                <product_type>Namespace_Modulename_Model_Product_Type</product_type>
            </rewrite>
        </bundle>
    </models>
....
</global>

Obviously, the danger is that you will sell more items than you have stock to supply, so that needs to be a business decision...

寄人书 2024-10-15 02:05:18

如果您不关心销售捆绑包时某些商品缺货,您也可以将这些商品标记为不跟踪库存。再次强调,这允许您销售低于 0 数量的商品,但选择此选项后不应将其标记为缺货。

If you don't care that some of your items are out of stock when selling the bundle, you could also mark those items as not keeping track of inventory. Once again, this allows you to sell below 0 qty, but it should not mark them as out of stock when this is selected.

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