product-quantity

Display always stock status without quantity in WooCommerce

风流意气都作罢 提交于 2020-08-09 09:20:17
问题 I would like to display the product stock status, without showing the remaining quantity. Right now, the standard WooCommerce stock display, as well as the plugins I found so far (WooCommerce Booster, etc), display either the quantity, or a "package deal" showing the quantity AND the phrase "in stock". In other words, I have: "5 in stock" I want to show: "In Stock" Is this possible? If so, how? 回答1: Resolved. Woocommerce -> Settings -> Products -> Inventory -> Stock Display Format. ...can't

Display always stock status without quantity in WooCommerce

烂漫一生 提交于 2020-08-09 09:20:09
问题 I would like to display the product stock status, without showing the remaining quantity. Right now, the standard WooCommerce stock display, as well as the plugins I found so far (WooCommerce Booster, etc), display either the quantity, or a "package deal" showing the quantity AND the phrase "in stock". In other words, I have: "5 in stock" I want to show: "In Stock" Is this possible? If so, how? 回答1: Resolved. Woocommerce -> Settings -> Products -> Inventory -> Stock Display Format. ...can't

Change Woocommerce product quantity in checkout table

好久不见. 提交于 2020-01-13 18:36:26
问题 I would like to change the way Woocommerce is displaying the product quantity in the order review table. I would like the quantity to be underneath the product name instead of after it. I found this post which helped, but the code only changes the quantity layout for variable products. How can I change it for EVERY product, even simple ones? 回答1: This can be done in multiple ways: 1) Overriding template checkout/review-order.php via your child theme. 2) Customizing the product item name: add

Show quantity input as readonly on cart page when min value is equal to max value in WooCommerce

风格不统一 提交于 2019-12-24 20:43:59
问题 Applying this filter with min and max = 1 will make quantity input field disappear on cart page: add_filter( 'woocommerce_quantity_input_args', 'custom_cart_qty_range', 10, 2 ); function custom_cart_qty_range( $args, $product ) { $args['min_value'] = 1; $args['max_value'] = 1; return $args; } I completely don't understand this "feature", because customers don't see item quantity at all. I would like to make input readonly and apply custom CSS instead. I have this CSS ready, but what I need is

Add product quantity field limited to the available quantity in Woocommerce shop loop

隐身守侯 提交于 2019-12-24 10:22:43
问题 In Woocommerce, I'm using this code to add the quantity field in woocommerce shop loop: /** * Override loop template and show quantities next to add to cart buttons */ add_filter( 'woocommerce_loop_add_to_cart_link', 'quantity_inputs_for_woocommerce_loop_add_to_cart_link', 10, 2 ); function quantity_inputs_for_woocommerce_loop_add_to_cart_link( $html, $product ) { if ( $product && $product->is_type( 'simple' ) && $product->is_purchasable() && $product->is_in_stock() && ! $product->is_sold

Progressive fixed Coupon Discount based on specific product quantity in Woocommerce

不羁的心 提交于 2019-12-23 03:40:33
问题 I have one little problem that dont know how to fix myself. I want to use this logic into my Woocommerce store just for one product. I have use link like this to autmatically apply coupon code and add to cart: https://testsite.com/checkout/?add-to-cart=Product_ID&quantity=1&coupon=Coupon_Code and this seems to work, when quantity is 1. But i want discount (30%) that is automatically placed when click on direct link from before, to make dynamic, for ex: Increase quantity to 2 in cart page, and

Custom plus and minus quantity buttons in Woocommerce 3

夙愿已清 提交于 2019-12-18 05:05:42
问题 I’m building custom WordPress and WooCommerce theme and adding custom plus and minus buttons to Product page quantity field . The buttons do update quantity input's value and I also receive "Item has been added to your cart" notification (on Product page) when I submit Add to Cart. But the cart page doesn’t show any items, neither says the cart is empty. I can not work out which WooCommerce JS function I’m suppose to hook into, neither how to hook into it. Could I ask for help please?! Thanks