hi @benoitfouc
Thanks for pointing out the issue. I will be fixing it today in a new update. Sorry for the inconvenience.
Regards
Hi @benoitfouc
the buttons + and — are displayed on product who have 1 quantity in stock.
This plugin does not tracks inventory, it will just add plus and minus buttons. Rest will be handled by woocommerce.
So they are useless and nothing happen when we click on them
The updated version has new js and css files. If you are using any cache plugin, please purge and do a hard refresh. It will work.
But during the update i see and error related to this file :
product-quantity-updater/wooqb.php
The latest version (1.1.1) of the plugin does no have this error.
And now the plugin is enabled but not working and not appear on the “WooCommmerce” menu. I completly uninstall and install again the plugin but issue still here
Since version 1.1, the plugin menu has a new location. You will find it here at
TG WooTools->Product Quantity Buttons.
https://www.awesomescreenshot.com/image/46759298?key=d7073300e673af926b09ae6afecb0b4f
-
This reply was modified 2 months, 2 weeks ago by Asif Aziz.
Hello Asif, first thank you very much for replying.
I was able to activate again the plugin on his new location thank you.
About the main problem, is there a way to his buttons on product who have only 1 quantity stock AND for product limited to 1 per order ?
Exemple of product in stock : https://dev.trot.naturepartage.com/produits-entretien-et-cirages/boite-de-cirage-noir (all is ok)
Example of product with only 1 in stock : https://dev.trot.naturepartage.com/produits-entretien-et-cirages/brillance-cuir (input quantity is hidden but not the buttons + and -)
Example of product limited to 1 per order : https://dev.trot.naturepartage.com/semelles/enfant/semelles-fraicheur-enfant-multi-tailles (input quantity is hidden but not the buttons + and -)
regards
-
This reply was modified 2 months, 2 weeks ago by benoitfouc.
Hello there, i made a fix by myself using this code on my functions.php’s theme file :
add_action( 'woocommerce_after_single_product', 'hide_qty_buttons', 30 );
function hide_qty_buttons() {
global $product;
// Si le produit a une seule quantité en stock ou peut être acheté un par un
if ( $product->get_stock_quantity() == 1 || !$product->backorders_allowed()) {
?>
<style>
.tgqb-qty-updater {
display: none !important;
}
</style>
<?php
}
}
add_action( 'woocommerce_after_cart', 'hide_qty_buttons_cart', 10 );
function hide_qty_buttons_cart() {
?>
<style>
.woocommerce-cart .tgqb-qty-updater {
display: none !important;
}
</style>
<?php
}
regards
Hi @benoitfouc
Sorry for my late reply. Thank you for sharing your code. It seems to be working well. Though I have fixed the issue more practically in the latest release (1.1.2) of the plugin. Please upgrade to see it working.
Thanks & Regards