简体   繁体   English

Magento-可配置产品未显示缺货商品

[英]Magento - Configurable product is not showing out of stock items

We're running Magento 1.9.2.4 我们正在运行Magento 1.9.2.4

There are several simple products making up a few configurable products which we are wanting customers to be able to order if they are in stock or out of stock. 有几种简单的产品构成了一些可配置的产品,我们希望客户能够订购有现货或无现货的产品。

We're running custom themes and plugins, i've reverted back to RWD to ensure there are no template mistakes and disabled all of the plugins. 我们正在运行自定义主题和插件,我已恢复为RWD以确保没有模板错误并禁用了所有插件。

All options have been set globally, i've double checked the both the simple and configurable products to ensure that they are set with product levels and are in stock where applicable. 所有选项均已全局设置,我已经仔细检查了简单和可配置产品,以确保它们设置有产品级别,并且在适用时有现货。

Cache has been cleared and all data has been re-indexed. 缓存已清除,所有数据都已重新编制索引。

I've attached a screen shot of the settings. 我已经附上了设置的屏幕截图。

https://www.dropbox.com/s/x96aqhh2h9b86ik/Screenshot%202017-02-14%2018.59.54.png?dl=0 https://www.dropbox.com/s/x96aqhh2h9b86ik/Screenshot%202017-02-14%2018.59.54.png?dl=0

I've read lots of threads and there appears to be a few people that have had this issue on different versions of Magento but none of the fixes appear to have worked. 我已经阅读了很多主题,似乎有人在不同版本的Magento上遇到了此问题,但似乎所有修复都没有起作用。

Any help would be appreciated! 任何帮助,将不胜感激!

Thanks Charles 谢谢查尔斯

I found the issue, the availability.phtm file needed updating to pull in another status. 我发现了问题,需要更新Availability.phtm文件以获取其他状态。

There was an article I found online which helped, its not 100% right for 1.9.2.4 but got me most of the way there. 我在网上找到了一篇文章,该文章对1.9.2.4并非100%正确,但我却能从中找到大部分帮助。

<?php $_product = $this->getProduct() ?>
<?php echo $this->getPriceHtml($_product) ?>
<?php $stockLevel = (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty(); ?>

<?php if($_product->isSaleable()<strong> && $stockLevel > 0</strong>): ?>
    <p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
<?php elseif($_product->isSaleable() && $stockLevel <= 0): ?>
    <p class="availability in-stock">
        <?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Available for Backorder') ?></span><br />
        <?php echo $this->__('Please allow up to two weeks for delivery') ?>
    </p>
<?php else: ?>
    <p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
<?php endif; ?>

https://edmondscommerce.github.io/magento/ssssssssssssss.html https://edmondscommerce.github.io/magento/ssssssssssssss.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM