Sp?rsm?l vedr. avrunding av bel?p
-
Heisann!
Jeg har gjort en liten test med denne koden for ? runde av alle bel?p til hele kroner n?r dynamic pricing er brukt til ? rabattere produkter. Ser ut til at det fungerer med Vipps standard men ikke med Vipps hurtigkasse.
add_filter( 'woocommerce_get_price_including_tax', 'round_price_product', 30, 1 ); add_filter( 'woocommerce_cart_get_total', 'round_price_product', 30 ); add_filter( 'woocommerce_cart_get_subtotal', 'round_price_product', 30 ); function round_price_product( $price ) { return round( $price ); } add_filter( 'woocommerce_cart_subtotal', 'round_subtotal', 30, 3 ); function round_subtotal( $subtotal, $compound, $cart ) { return wc_price( round( $cart->get_subtotal() + $cart->get_subtotal_tax() ) ); }
Har du noen formening om dette?
Mvh
Rune
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Sp?rsm?l vedr. avrunding av bel?p’ is closed to new replies.