• Resolved Windurin

    (@windurin)


    Hi. I’m trying to add deposit data to a cart plugin. Is there a Shortcode or Hook for showing only the ‘Due Today’ & ‘Future Payments’ amounts based on the current cart contents? Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor sanesh_acowebs

    (@saneshacodez)

    Deposits details are available on the cart object. You can check using:
    WC()->cart->deposit_info

    Thread Starter Windurin

    (@windurin)

    Hi. Thanks, I was able to get this to show but only on the cart template page.

    How can I get to to show anywhere – so for example in my popup cart which is part of the header so basically on every page? On non Cart pages the values are not accurate. It will show Due Today as £0.00 and Future Payments as the full amount for example.

    I tried using global $woocommerce and replacing WC() with $wooocommerce but it’s still not working.

    Thread Starter Windurin

    (@windurin)

    I got it working – it seems it does apply within the cart template of the plugin I’m using. The only thing I need to implement now is to only show the deposits info if the cart contains items where deposits are enabled. What would the condition check be for that please? Thanks.

    EDIT: It’s working with the following:

    <?php if( WC()->cart->deposit_info[deposit_enabled] ): ?>

    • This reply was modified 1 year, 4 months ago by Windurin.
    • This reply was modified 1 year, 4 months ago by Windurin. Reason: Code formatting
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shortcode or Hook for showing only the Due Today & Future Payments Totals’ is closed to new replies.