Home › Forums › WoodMart support forum › move "order tracking" and "compare items"
move "order tracking" and "compare items"
- This topic has 12 replies, 3 voices, and was last updated 2 years, 11 months ago by Luke Nielsen.
-
AuthorPosts
-
September 16, 2021 at 1:47 pm #319084
loraloraParticipantHey
how can i move “order tracking” and “compare items” to the tabs of my account? How is it with the favorites tab?
September 17, 2021 at 1:04 pm #319344
Luke NielsenKeymasterHello,
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
November 8, 2021 at 3:22 pm #330303
StefanParticipantHi Luke!
Any method to add icons to compare & order tracking tabs?
See attached picAttachments:
You must be logged in to view attached files.November 9, 2021 at 10:24 am #330438
Luke NielsenKeymasterHello,
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
Kind Regards
November 20, 2021 at 5:04 pm #333365
loraloraParticipantthe 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.
November 22, 2021 at 8:53 am #333596
Luke NielsenKeymasterHello,
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
December 28, 2021 at 4:30 pm #342373
loraloraParticipantHi, 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 4315ltrim()
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:228December 28, 2021 at 4:44 pm #342374
loraloraParticipantaddendum 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.
December 29, 2021 at 11:01 am #342513
Luke NielsenKeymasterHello,
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
December 29, 2021 at 5:18 pm #342609
loraloraParticipantok
December 30, 2021 at 10:30 am #342696
Luke NielsenKeymasterHello,
Provide us with your FTP access to website files, please, so that we could take a close look.
Kind Regards
December 30, 2021 at 11:30 am #342705
loraloraParticipantdone
December 30, 2021 at 2:05 pm #342723
Luke NielsenKeymasterHello,
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
-
AuthorPosts
- You must be logged in to create new topics. Login / Register