magento 捆绑产品显示缺货
我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,捆绑包的库存水平是根据捆绑包项目中所需的每个选项的选择来计算的。如果您想更改该行为,则需要重写
Mage_Bundle_Model_Product_Type
类中的isSalable($product)
函数,以便它返回 true
。您可以通过使用扩展 Mage_Bundle_Model_Product_Type 的模型创建自己的模块来实现这一点,并且在 config.xml 中您将需要:
显然,危险在于您销售的商品数量会超过库存供应量,所以这需要是一个商业决策......
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 theMage_Bundle_Model_Product_Type
class so that it isreturn 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:Obviously, the danger is that you will sell more items than you have stock to supply, so that needs to be a business decision...
如果您不关心销售捆绑包时某些商品缺货,您也可以将这些商品标记为不跟踪库存。再次强调,这允许您销售低于 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.