Home Forums WoodMart support forum move "order tracking" and "compare items"

move "order tracking" and "compare items"

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #319084

    loralora
    Participant

    Hey

    how can i move “order tracking” and “compare items” to the tabs of my account? How is it with the favorites tab?

    #319344

    Luke Nielsen
    Keymaster

    Hello,

    In order to add the compare list and order tracking, you need to add this code to the functions.php file in your child theme

    if ( ! function_exists('account_navigation_add_compare_tracking') ) {
    
        function account_navigation_add_compare_tracking( $items ) {
            unset( $items['customer-logout'] );
    
            if ( woodmart_get_opt( 'compare' ) && woodmart_get_opt( 'compare_page' ) ) {
                $items['compare'] = esc_html__( 'Compare', 'woodmart' );
            }
    
            $items['order-tracking'] = esc_html__( 'Order Tracking', 'woodmart' );
            $items['customer-logout'] = esc_html__( 'Logout', 'woodmart' );
    
            return $items;
        }
    
       add_filter( 'woocommerce_account_menu_items',  'account_navigation_add_compare_tracking', 15 );
    }

    Don’t forget to change the permalink on the tracking page

    https://gyazo.com/b9c385d3753e20ad1da39a280de0da17

    Kind Regards

    #330303

    Stefan
    Participant

    Hi Luke!

    Any method to add icons to compare & order tracking tabs?
    See attached pic

    Attachments:
    You must be logged in to view attached files.
    #330438

    Luke Nielsen
    Keymaster

    Hello,

    You can change icons using custom CSS code in Theme Settings -> Custom CSS -> enter the code below in the “Global Custom CSS” field.

    .woocommerce-MyAccount-content .compare-link a:before {
        content: "\f036";
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
    }
    
    .woocommerce-MyAccount-content .status-link a:before {
        content: "\f2f1";
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
    }

    In order to change another icon just replace the value after the slash ‘/’ of the “content” attribute using the Font Awesome service.

    https://fontawesome.com/v5.15/icons

    https://prnt.sc/1x2068z

    Kind Regards

    #333365

    loralora
    Participant

    the code works and everything is super.
    But I ran into a problem that when going to the compare page and tracking the order, it does not give its “my account” sidebar (as Woodmart’s wishlist does).

    I want these pages to behave like a wishlist for automated users and guests.

    #333596

    Luke Nielsen
    Keymaster

    Hello,

    Our “Wishlist” and “My account” come from WooCommerce. The sidebar is shown only on the tabs that are by default in “My account”. Therefore, our custom “Order Tracking” and ”Compare” tabs don’t have such functionality for showing the “My account” sidebar. We also don’t have custom code for showing sidebar on these tabs.

    Kind Regards

    #342373

    loralora
    Participant

    Hi, I have successfully used your code (your answer to my question, in this thread) and there were no problems before. Now I noticed that there is an error on the comparison page.

    Tell me what to ask and how to fix it

    Fatal error: Uncaught Error: ltrim(): Argument #1 ($string) must be of type string, array given
    in /public_html/wp-includes/formatting.php on line 4315

    ltrim()
    wp-includes/formatting.php:4315
    esc_url()
    wp-content/themes/woodmart/inc/integrations/woocommerce/modules/compare.php:471
    woodmart_compare_display_field()
    wp-content/themes/woodmart/inc/integrations/woocommerce/modules/compare.php:355
    woodmart_get_compared_products_table()
    wp-content/themes/woodmart/inc/integrations/woocommerce/modules/compare.php:23
    woodmart_compare_shortcode()
    call_user_func()
    wp-includes/shortcodes.php:356
    do_shortcode_tag()
    preg_replace_callback()
    wp-includes/shortcodes.php:228

    #342374

    loralora
    Participant

    addendum to ticket: comparison list doesn’t work not because i’m using code.

    Comparison list does not work if I select more than 4 products to compare.

    #342513

    Luke Nielsen
    Keymaster

    Hello,

    Could you please disable all plugins that are not related to our theme and provide us your admin access so we can check it on your side?

    Kind Regards

    #342609

    loralora
    Participant

    ok

    #342696

    Luke Nielsen
    Keymaster

    Hello,

    Provide us with your FTP access to website files, please, so that we could take a close look.

    Kind Regards

    #342705

    loralora
    Participant

    done

    #342723

    Luke Nielsen
    Keymaster

    Hello,

    Sorry for the misunderstanding. It’s a bug in our theme that is going to be fixed in the next update for sure. This bug has already been fixed on your site.

    Kind Regards

Viewing 13 posts - 1 through 13 (of 13 total)