for some products I need to set a maximum product quantity but it seems the plugin has not this feature, is it right?
In this case I can set the maximum product quantity in some other way but the price table will be wrong (see screenshot).
Any solution or suggestions?
Thanks.
I’m devoloping a webpage for e-commerce with Categories, Sub-Categories and Products.
In each Sub-Categories the customer can only buy the exact quantity of the Sub-Category. So, for example, if the Sub-Category is “5 meals” the customer can only select the exact number of 5.
What I’m trying to do is:
– Remove the “Add to Cart” button from each product. The customer can only select the quantities for each product.
– In the Sub-Category page, only one “Add to Cart” button should be visible.
– If the customer select less or more of the Sub-Category quantities, then the “Add to Cart” button should be grey.
Example 1:
Sub-Category: 5 meals
14 different meals to choose
The customer select 2 quantities of meal.1, and 2 quantities of meal.2
Expected results:
– Add to cart button grey
– Legend: “You have selected 4 meals, and you have to select 5”
Example 2:
Sub-Category: 5 meals
14 different meals to choose
The customer select 2 quantities of meal.1, 2 quantities of meal.2 and 1 quantity of meal.3
Expected results:
– Add to cart button available
– When the “Add to cart” button is clicked, the customer will see the 5 meals selected in the cart.
I hope you can help me.
Thank you in advance.
Please can you make the error messages user editable.
OR
Can you please update the error messages as follows:
‘_wcmmq_s_msg_min_limit’ => __( ‘A minimum quantity of %s “%s” can be purchased’, ‘wcmmq’ ), //First %s = Quantity and Second %s is Product Title
‘_wcmmq_s_msg_max_limit’ => __( ‘A maximum quantity of %s “%s” can be purchased’, ‘wcmmq’ ), //First %s = Quantity and Second %s is Product Title
‘_wcmmq_s_msg_max_limit_with_already’ => __( ‘You already have %s “%s” in your cart’, ‘wcmmq’ ), //First %s = $current_qty_inCart Current Quantity and Second %s is Product Title
Many thanks.
]]>Would you be able to add an option where we can limit max quantity purchase per product?
Thank you for the plugin.
]]>I’d rather deal with plugins that have good functionality that make me want to upgrade, than those that force you to because it won’t function without payment. Not a good deal here.
]]>Now….if there were a plugin that allows you to add a new variation where a separate variation form appears so you can enter the unique data again…that’d be great…but I don’t think there is one. Would also be great if the ticker stopped going up when the set maximum quantity is reached. If I find a way to do so, I’ll mod the code below to reflect that.
The following code will assist you in letting your customers know what the max quantity is for your product and will let you hide the quantity ticker if the max quantity is set to 1. You of course can easily modify this to suit your theme and product type use.
// display max quantity allowed if set on single product page
add_action('woocommerce_single_product_summary', 'maxquantityallowed', 30);
function maxquantityallowed() {
if(get_post_meta( get_the_ID(), 'maximum_allowed_quantity', true ) ){
echo 'Maximum quantity allowed for this product is <strong>'. get_post_meta( get_the_ID(), 'maximum_allowed_quantity', true ) .'</strong>. Request a custom quote for bulk orders.'; }
}
// hide quantity box if max quantity is set to one
add_action('wp_head','hide_quantity_counter');
function hide_quantity_counter() {
global $product;
$product = new WC_Product( get_the_ID() );
$productcount = get_post_meta( get_the_ID(), 'maximum_allowed_quantity', true );
if (($product->is_type( 'bundle' )) || $productcount == 1) { echo '<style> div.bundled_item_cart_content div.bundle_button div.quantity {display:none!important;} </style>'; }
if (($product->is_type( 'simple' )) || $productcount == 1) { echo '<style> div.quantity {display:none!important;} div.bundled_product div.quantity {display:inherit!important;} </style>'; }
if (($product->is_type( 'variable' )) || $productcount == 1) { echo '<style> div.variations_button div.quantity {display:none!important;} div.bundled_product div.variations_button div.quantity {display:inherit!important;} </style>'; }
}
]]>