dynadubedesign
Forum Replies Created
-
This issue has not been resolved yet.
(I tried the new update from 2020-07-11) Hopefully the developers will make this plugin supported for Storefront in near future.Really like this plugin and Storefront theme is one of the most installed WooCommerce theme .
Found the solution that I think works fine now:
In custom-checkout-layouts-for-woocommerce.2.0\custom-checkout-layouts-for-woocommerce\WooCommerce\cclw_checkout\orderreview-table.php
<input type="number" id="qty1" class="input-text qty text" step="1" min="1" max="<?php echo $_product->get_stock_quantity();?>" name="cart[<?php echo $cart_item_key; ?>][qty]" value="<?php echo $cart_item['quantity'];?>" title="Qty" size="4" inputmode="numeric">
I changed the code to
<?php if( $_product->backorders_allowed() ) { $allow_backorder = ''; }else{ $allow_backorder = $_product->get_stock_quantity(); } ?> <input type="number" id="qty1" class="input-text qty text" step="1" min="1" max="<?php echo $allow_backorder;?>" name="cart[<?php echo $cart_item_key; ?>][qty]" value="<?php echo $cart_item['quantity'];?>" title="Qty" size="4" inputmode="numeric">
in custom-checkout-layouts-for-woocommerce.2.0\custom-checkout-layouts-for-woocommerce\WooCommerce\cart\cart.php
you have a ‘max_value’ => $_product->get_max_purchase_quantity(),
and you could use a if() statement with WC_Product::backorders_allowed(); that could be used to solve this problem or correct me if i’m wrong?<td class="product-quantity" data-title="<?php esc_attr_e( 'Quantity', 'woocommerce' ); ?>"><?php if ( $_product->is_sold_individually() ) { $product_quantity = sprintf( '1 <input type="hidden" name="cart[%s][qty]" value="1" />', $cart_item_key ); } else { $product_quantity = woocommerce_quantity_input( array( 'input_name' => "cart[{$cart_item_key}][qty]", 'input_value' => $cart_item['quantity'], 'max_value' => $_product->get_max_purchase_quantity(), 'min_value' => '0', 'product_name' => $_product->get_name(), ), $_product, false ); }
- This reply was modified 4 years, 5 months ago by dynadubedesign.
Any update on this?
Thank for a amazing plugin!
Forum: Plugins
In reply to: [Custom Query Blocks] PaginationThank you, it works perfect now! ??
Forum: Plugins
In reply to: [Custom Query Blocks] PaginationThe problem emerge when I use the plugin on the static main page “Home” in WordPress but not on a sub-page.
Forum: Plugins
In reply to: [Custom Query Blocks] Pagination