在 BigCommerce 主题文件中设置 "STOCK_LEVEL" 的位置,以便 < 400 显示 "OUT OF STOCK"

Where to set the "STOCK_LEVEL" in BigCommerce Theme Files so < 400 shows "OUT OF STOCK"

我正在尝试让 BigCommerce 中库存水平低于 400 的产品显示为“缺货”

我在 /templates/components/products/card 中编辑了文件。html

它说“{{#if stock_level '<' 1}}”的每个实例我都将其更改为“{{#if stock_level '<' 400}}”

但它没有将库存水平低于 400 的商品的添加到购物车按钮更改为缺货。

我是不是漏掉了什么?

谢谢....

这取决于您使用的主题,但大多数主题会查找 {{#if product.out_of_stock}} 或 {{#if product.can_purchase}} 来确定是否显示缺货消息。因此,您可能需要更改其中一项。

这个问题的答案就是用这个来显示缺货与否

{{#if stock_level '<' 201}} 缺货 7 {{/if}}