Code Monkey home page Code Monkey logo

Comments (9)

WPprodigy avatar WPprodigy commented on August 27, 2024

Does the store maybe have it set to use comma's as the decimal place? May need to do 0,50 if so.

from woocommerce-product-fees.

agenceldp avatar agenceldp commented on August 27, 2024

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

from woocommerce-product-fees.

WPprodigy avatar WPprodigy commented on August 27, 2024

Gotcha. So if you enter a fee of 0,50, does it work?

from woocommerce-product-fees.

agenceldp avatar agenceldp commented on August 27, 2024

Exactly. the settings of the decimals is good but despite everything when i enter a fee : 0.50€ it does not calculate it.

from woocommerce-product-fees.

WPprodigy avatar WPprodigy commented on August 27, 2024

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.

from woocommerce-product-fees.

agenceldp avatar agenceldp commented on August 27, 2024

When I enter 0,5€ (with a comma) it doesn't work, whereas if I enter 1€, the calculation is done.

Capture d’écran 2021-07-06 à 10 28 56

from woocommerce-product-fees.

WPprodigy avatar WPprodigy commented on August 27, 2024

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.

fee
settings
cart

from woocommerce-product-fees.

agenceldp avatar agenceldp commented on August 27, 2024

Really i don't understand, i change the theme and disable all the extensions and despite i don't see the 0,5 fee...

from woocommerce-product-fees.

WPprodigy avatar WPprodigy commented on August 27, 2024

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.

from woocommerce-product-fees.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.