Hello @galabaras,
Not clear, what did you mean? Can you explain more please.
Hello Gal Baras,
If I normally try to update from the default cart page, it does not let me. https://prnt.sc/R4wyaM0H-bxd
But i can see that, I can do that from the side cart. I need some information about that to check.
- Is it a plugin? If, them give me the plugin name.
- If it comes with the theme, give me the theme name.
Thanks
Fazle Bari
Hello,
https://prnt.sc/lr8Y74VZMINA is it a plugin of default theme cart?
Please give us the theme or plugin name. See my previous reply.
Thanks
No plugin. It’s the WooCommerce Mini-cart block used via a site editor header template.
@fazlebari Please take a look at this GitHub reply and add the Store API filters to your plugin with the same values as those used in the current filters from the plugin settings.
Hello,
WooCommerce mini-cart block doesn’t contain any hook to control min-max or step quantity. That’s why it’s not possible to control quantity there. You may try a different way.
Hope you understand! Have a nice day!
Yes, I know, and it’s a problem for me (and likely others).
Please read the GitHub reply I’ve linked and ADD those hooks to the plugin. If that’s not possible, please participate in the discussion to help direct the WooCommerce team towards a solution that works.
Hello Gal,
We were unable to find your GitHub Issue. Could you please check again? If you’re interested in contributing to our plugin, feel free to reach out through our support channel or GitHub repository. Your participation is highly valued.
Thanks!
What makes you think this issue is resolved? I think it still exists and needs addressing.
The link you shared is on WooCommerce itself. WooCommerce is not our plugin. And we have nothing to do as the WooCommerce mini-cart block doesn’t contain any hook. Thanks!
The link I shared contains instructions for you to change your plugin, which is a WooCommerce addon. Basically, unless you do this, you can’t claim full compatibility with the way WooCommerce handles the cart.
Hello Gal,
Thanks for your reply!
Our technical team started analyzing this. We will give you an update as soon as possible. Thanks for your cooperation!
Best regards,
Ibrahim
Here’s some sample code that’s confirmed to work and you can adapt.
add_filter( 'woocommerce_store_api_product_quantity_minimum','return_20_for_now', 10, 2 );
add_filter( 'woocommerce_store_api_product_quantity_multiple_of','return_20_for_now', 10, 2 );
function return_20_for_now( $qty, $cartItemData ){
$product_id = $cartItemData->get_id();
return 20;
}
Why is this taking so long?