• Anna

    (@anna88sabu)


    I need a cost calculator for my customers with possibility of saving the steps in the customer account. (wishlist with cost calculator)

    I′m event manager and I am developing my new website.

    I want that my customers to be able to change their input on wishlist later and continue working on the cost estimate later. This should be saved in the customer account (logged in user). Is this possible with your plugin TI WooCommerce Wishlist?

    I need not payment function,but I need the estimation function for logged in user for their own wishlist.
    Can you help me?

Viewing 1 replies (of 1 total)
  • Plugin Author WPClever

    (@wpclever)

    Hi @anna88sabu

    You can try below snippet (How to add custom code?):

    add_action( 'woosw_after_items', 'woosw_estimate_total', 99, 2 );
    function woosw_estimate_total( $key, $products ) {
        $total = 0;
        if ( is_array( $products ) && ! empty( $products ) ) {
            foreach ( $products as $product_id => $product_data ) {
                $_product = wc_get_product( $product_id );
                if ( ! $_product ) {
                    continue;
                }
                $total += (float) wc_get_price_to_display( $_product );
            }
        }
        if ( $total > 0 ) {
            echo '<div class="woosw-total">Total: ' . wc_price( $total ) . '</div>';
        }
    }

    And the result https://www.screencast.com/t/hZ4eicrcX3o. It was shown on the wishlist popup too https://www.screencast.com/t/DIJkWcEG

Viewing 1 replies (of 1 total)
  • The topic ‘wishlist with cost calculator’ is closed to new replies.