• Resolved e.lito

    (@elito-1)


    Hi,
    i would like to display total fees just after the subtotal.
    Like this : 30,00€24,00€ fee = 6,00€.

    Is it possible ?
    There is only two options ‘Before order total’ or ‘After order total’.
    Can i create a new option with new location or is there any snippet to include in functions.php or in cart-totals.php.

    Thank you very much in advance for your help.
    And thank you for the plugin.

    Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • Good day, @elito-1
    1. To rewrite cart totals amount saved template, copy file from
    “wp-content/plugins/advanced-dynamic-pricing-for-woocommerce/templates/amount-saved/cart-totals.php”
    to
    “wp-content/themes/{YOUR_CURRENT_THEME}/advanced-dynamic-pricing-for-woocommerce/amount-saved/cart-totals.php”
    and edit it.

    2. There is only two options ‘Before order total’ or ‘After order total’.
    I can add new locations using filter “wdp_cart_discount_message_places”

    add_filter( "wdp_cart_discount_message_places", function ( $places ) {
    	// example
    	$places['woocommerce_cart_totals_before_order_total'] = __( 'Before order total', 'advanced-dynamic-pricing-for-woocommerce' );
    	$places["YOUR ACTION OR FILTER"]                      = "LABEL";
    
    	return $places;
    } );
    Thread Starter e.lito

    (@elito-1)

    Woaw thank you for your reply.

    1. OK
    2. don’t work for me here is what i had to functions.php

    add_filter( "wdp_cart_discount_message_places", function ( $places ) {
    	// example
    	$places["LITO_woocommerce_cart_totals_after_subtotal"] = "After cart subtotal (après le sous-total)";
    
    	return $places;
    } );

    I not have option ‘After cart sub total’ in the dropdown in customizer.

    and in my ‘cart-totals.php’ i had this code to the place i want the amount saved <?php do_action( 'LITO_woocommerce_cart_totals_after_subtotal' ); ?>

    What’s wrong ?

    And thank you for reactivity.
    Regards

    Good day, @elito-1

    Use “Code snippets” plugin, please. functions.php runs too late

    Thread Starter e.lito

    (@elito-1)

    PERFECT ! THANK YOU have a good day @rescueranger.

    Good day, @elito-1
    You are welcome ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Display total fee after cart subtotal’ is closed to new replies.