woocommerce-product-fees
woocommerce-product-fees copied to clipboard
Decimals
Hello,
I'm a french freelance and first of all thank you very much for your plug-in !
I installed the plug-in on a wordpress site and I have a problem. The site in pogress sells goods in consignment. Also, the plugin is used to enter a fee-consignment per product added to the cart.
For example a milk bottle, it is 0.50€ euro deposit.
The total does not take into account the amount of 0.5, is it too small?
How i can cure it ?
Thanks a lot
Julien
Does the store maybe have it set to use comma's as the decimal place? May need to do 0,50
if so.
Yes. About the calculation of the products works well. You can find the parameters below :
Options de devise : euro Position de la devise : droite Séparateur milliers : . Séparateur décimal : , Nombre de décimales : 2
Gotcha. So if you enter a fee of 0,50
, does it work?
Exactly. the settings of the decimals is good but despite everything when i enter a fee : 0.50€ it does not calculate it.
Sorry to keep asking, but I'm still a bit unclear so to clarify - you are using a COMMA when typing in the fee?
A screenshot of the settings area would help as well.
When I enter 0,5€ (with a comma) it doesn't work, whereas if I enter 1€, the calculation is done.
Hmm, I see. I'm pretty sure something is conflicting with it, perhaps some rounding logic. If you have a test site/staging - trying disabling other plugins except for just WooCommerce & Product Fees. And switch to a default WordPress theme as well.
Really i don't understand, i change the theme and disable all the extensions and despite i don't see the 0,5 fee...
I'm really not sure either then :/. Perhaps take a look at rounding settings / number of decimals, as well as the tax classes you may be applying too fees.
And then this is the simplest distilled version of adding a fee:
add_action( 'woocommerce_cart_calculate_fees', function( $cart ) {
$cart->add_fee( 'Example Fee', '0.50', false, '' );
}, 15 );
Could put that in your theme's function.php file and see what happens.