Hooking the woocommerce cart into the header menu

M Started by Mike · August 17, 2019 at 1:53 am · 10 replies 1 voice Last reply 6 years, 10 months ago
M
Mike Original poster Member
#1

I want my cart link and counter to appear in the krystal shop header menu. I looked at the header.php file, it seems that the header nav menu is called thusly:

do_action( ‘krystalpro_action_header’ );

But when I add action using that hook, the cart counter ends up completely outside the header nav div, behind the header. I don’t think I am using the right hook. What would be the correct hook to use to hook into the header menu, so that the cart counter appears, ideally, as an li in the nav menu?

ST
Spiracle Themes Original poster
#5

Hi Mike,

We have just updated our theme to version 1.1.9
You’ll see an update notice in your WordPress admin dashboard.

Best Regards

M
Mike Original poster
#6

Okay, so the update fixed the cart issue, but now I have the same issue for the back to top button. the icon shows as a square, but should show as an up arrow.

M
Mike Original poster
#8

Any idea where to start? I may not have that kind of time. Let’s open-source fix this here and now. Probably the same fix you did for the cart.

ST
Spiracle Themes Original poster
#9

Hi Mike,

Yes, actually the issue is arising due to the Font Awesome version. The Elementor page builder is using Font Awesome version 5 and our theme was having version 4 which we have updated recently to version 5. We need to check the bottom to top icon also for this or we have to change its CSS.

Best Regards

M
Mike Original poster
#10

Yes! I tried that too in child theme using different fa icon, but somehow it’s not resolving. I even gave it larger area, still no love.

Perhaps dequeueing krystal fontawesome version 4 in child theme and requeue version 5?

.btntoTop {
width: 40px;
height: 40px;
}

.btntoTop:before {
font: 30px ‘FontAwesome’;
content: “\f062”!important; /*overrides parent style*/
}

Post a reply

Join the conversation. Be kind — this is a public forum.

Replying to Hooking the woocommerce cart into the header menu

By posting, your reply becomes public (unless marked private).