简体   繁体   English

如何在woocommerce中为缺货产品启用“添加到购物车”按钮?

[英]How to enable add to cart button for out of stock product in woocommerce?

Background: I have a Woocommerce store that is set up such that backorders are allowed for all products. 背景:我开设了一家Woocommerce商店,以便所有产品都可以延期交货。 However, despite backorders being allowed, when a product is listed as out of stock, the add to cart button disappears. 但是,尽管允许补货,但是当产品被列为缺货时,“添加到购物车”按钮将消失。 I've done a bit of research online, and it seems that around July of 2016, Woocommerce changed the backorders feature so that it would no longer allow customers to add products that are listed as out of stock to their cart. 我已经在网上进行了一些研究,似乎在2016年7月左右,Woocommerce更改了积压订单功能,以便不再允许客户将列为缺货的产品添加到购物车中。

I've heard a bunch of reasons for this change. 我已经听说了此更改的一系列原因。 However, it is important for my business to differentiate between out of stock products and in stock products--mostly to give customers notice that they will not receive out of stock products for 2-3 weeks, but in stock products will be delivered in just 3-4 days. 但是,对我的公司来说区分出库存产品和库存产品很重要-主要是要让客户注意,他们不会在2-3周内收到库存产品,而库存产品将在短时间内交付3-4天。

Does anyone have any recommendations as to how I might address this problem? 有人对我如何解决此问题有任何建议吗? I'm pretty weak at coding, FYI. 仅供参考,我的编码能力很弱。

As woocommerce provide Allow backorders feature so you don't need to do any custom code for this. 由于woocommerce提供了“允许缺货”功能,因此您无需为此执行任何自定义代码。

Please follow following steps:- 请按照以下步骤操作:
1-Keep your product in-stock. 1-将您的产品保留在库存中。
2-In back-order dropdown select =>Allow, but notify customer option. 2-在拖欠订单下拉列表中,选择=>允许,但通知客户选项。
3-Check product on frontend. 3-检查前端的产品。

Now add-to-cart button is enabled for back-orders and back order notification is also showing on the product page. 现在,添加到购物车按钮可用于延期交货,并且延期交货通知也显示在产品页面上。

May this will help you. 愿这对您有帮助。

暂无
暂无

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

相关问题 在 WooCommerce 中产品缺货时更改单个添加到购物车文本 - Change single add to cart text when product is out of stock in WooCommerce 隐藏在Woocommerce中变量产品缺货时添加到购物车块 - Hide Add to cart block when a variable product is out of stock in Woocommerce 根据 WooCommerce 产品自定义库存状态禁用添加到购物车按钮 - Disable add to cart button based on WooCommerce product custom stock status 如何解决 woocommerce 产品库存管理 - 加入购物车价值问题? - How to solve woocommerce product stock management - add to cart value problem? 如何在 Woocommerce 缺货产品文本下方添加单个产品的 Woocommerce 产品价格 - How can I add below of Woocommerce out of stock product text the Woocommerce product price on a single product 删除添加到购物车按钮,在 Woocommerce 单个产品页面中保留库存信息 - Remove Add to Cart button keeping stock info in Woocommerce single product pages 如何隐藏添加到购物车按钮特定角色和产品类别 Woocommerce - How to hide add to cart button specific role and product category Woocommerce Woocommerce - 产品页面 - 如何在“添加到购物车”按钮上创建 AJAX? - Woocommerce - Product Page - How to create AJAX on "Add To Cart" button? 如何将缺货产品转移到垃圾 Woocommerce? - How to move out of stock product to trash Woocommerce? 在“缺货”版本之间切换时,可变产品“添加到购物车”按钮会短暂显示 - Variable product Add to Cart button displays briefly when switching between 'out of stock' variations
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM