本文介绍了在 Woocommerce 中隐藏“缺货"产品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在产品"和库存"下,我检查了以下设置:从目录中隐藏缺货商品"

Under "Products" and "Inventory" I have checked the following setting:"Hide out of stock items from the catalog"

现在所有售罄的产品都隐藏在存档/类别视图中.到目前为止一切顺利.

Now all sold out products are hidden in the archive/category view. So far so good.

问题是隐藏的(缺货)产品是按页面计算的.因此,如果第一页上有 3 种产品售罄,则只会显示有库存的产品 (6).

The problem is that the hidden (out of stock) products are counted per page. So if there are 3 products that are sold out on the first page, only the ones in stock are showing (6).

似乎这些隐藏"的产品仍然可以搜索到,并且可以通过不同的小部件看到.

It also seems that these "hidden" products still are searchable as well, and visible through the different widgets.

任何想法如何解决这个问题?我的意思是真正隐藏缺货的产品.还是我需要手动删除它们?

Any ideas how to fix this? I mean to REALLY hide products that are out of stock. Or do I need to manuallly remove them?

推荐答案

自我注意:始终阅读开发人员的变更日志.

Note to self: Always read the changelog from developer.

在这里找到答案:http://develop.woothemes.com/woocommerce/2014/02/solving-common-issues-after-updating-to-woocommerce-2-1/#category-counts-incorrect

如果类别的产品计数显示过高或数字太低,更新到 WooCommerce 2.1 后有一个简单的解决方法.

转到 WooCommerce 中的工具"选项卡 > 系统状态WordPress 管理面板.在这里,您首先使用重新计数条款"按钮,然后使用清除瞬态"按钮.这会强制系统在下一次分类时重新计算所有产品已加载.

Go to the ‘Tools’ tab inside the WooCommerce > System Status of your WordPress administration panel. Here you first use the ‘Recount terms’ button and after that use the ‘Clear transients’ button. This will force the system to recount all the products the next time a category is loaded.

更新:还要记住,将库存数量更改为 0 是不够的.您还必须将库存状态"设置为缺货".否则,即使没有库存产品,也会将产品计入商店.

Update: Also remember that it is not enough to change stock quantity to 0. You must also set "Stock status" to "Out of stock". If not the product will be counted in the shop, even if there are no products in stock.

这篇关于在 Woocommerce 中隐藏“缺货"产品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 20:27
查看更多