• Resolved leahjm77

    (@leahjm77)


    Hi there, your plugin is great, thank you. Just one question. The description that is put in for the coupon shows at the top of the cart page beside “Discount applied” and also shows under the cart totals. Is it possible to have different wording in each area – ie – to simplify the “cart totals” area to show just the discounted dollar amount, but keep the discount description at the top?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Soft79

    (@josk79)

    Please send a screenshot expaining what you need changed.

    Thread Starter leahjm77

    (@leahjm77)

    Thank you for your reply! You can see a screenshot at – https://jrmhockeyart.com/wp-content/uploads/screenshot-rev.jpg

    Basically I realized people aren’t scrolling down to see the Cart Totals on mobile, they just see that the price doesn’t change in the chart at the top. So in the ‘discount applied’ message that appears at the top I want to tell them to scroll to the Cart Totals area to see the discount. But then that same message appears within the Cart Totals and doesn’t make sense there. So I’m wondering if under the Cart Totals it can just show the discounted amount (-$49.50 like in this example) but not show the ‘discount applied’ message beside it, just at the top of the cart. I thought I could hide the one under ‘cart totals’ using css but couldn’t get it to work. Thank you.

    Plugin Author Soft79

    (@josk79)

    Only with a PHP hack: You can use the filter woocommerce_coupon_message to alter the notice. Something like this (untested):

    
    add_filter( 'woocommerce_coupon_message', function( $msg, $msg_code, $coupon ) {
        $prefix = sprintf( __( 'Discount applied: %s', 'woocommerce-jos-autocoupon' ), '' );
        if ( 0 === strpos( $msg, $prefix ) ) {
            $msg .= " Scroll below to see discount.";
        }
        return $msg;
    }, 99, 3 );
    

    Then shorten the coupon description.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Discount applied message’ is closed to new replies.