- This topic has 6 replies, 3 voices, and was last updated 4 years, 4 months ago by Vlad777.
Tagged: cart menu Mini cart polestar woocommerce
- AuthorPosts
- February 20, 2018 at 1:38 pm #8820
Kristin OzanianParticipantHi, Andrew, I hope you’ve been well 🙂
I have a quick question as I cannot figure it out myself (not even with the help of the all-knowing Internet). I have the mini cart option on in the theme’s settings, all works perfectly except the mini cart does not display in the menu on the Cart and Checkout pages. I know it’s basic but I’d appreciate your help.
Thanks,
KrisFebruary 20, 2018 at 1:50 pm #8821
Andrew MisplonKeymasterHey Kris 🙂
Good to hear from you.
That’s by design. It’s a common pattern. On the cart page the mini-cart would be a duplication of the content already listed on the page. In checkout the idea is to focus users attention on the checkout process. You can also use the Stripped page layout on the cart and checkout pages to remove the menu, sidebar and footer widgets, that’s what it was created for.
If you want to reverse this pattern let me know and I’ll explain how to do to it in a child theme or custom function.
February 21, 2018 at 11:08 am #8830
Kristin OzanianParticipantHi, Andrew,
I know what you mean and I understand the common approach. Nonetheless my client insists on having the navigation bar displayed the same on all pages.
I’ll be hiding the cart drop down to avoid duplicating content. I intend on doing with #cart-drop {display:none;} as I cannot find the polestar_mini_cart() code anywhere to try and modify it in my child theme. There should be a better way so I rely on your suggestion.
Thanks!February 21, 2018 at 1:10 pm #8831
Andrew MisplonKeymasterIn the parent theme in
inc/template-tags.php
you’ll find the mini cart functionpolestar_mini_cart
. Copy the entire function and insert it into a child themefunctions.php
file or use the Code Snippets plugin. Remove this part of the opening conditional:&& ! ( is_cart() || is_checkout() )
So that line would then just be:
if ( class_exists( 'Woocommerce' ) ) : ?>
February 21, 2018 at 5:04 pm #8838
Kristin OzanianParticipantThank you for your FTL replies as always. Sorry for wasting your time… it is pretty obvious and I should have found it. After all you have delivered perfectly organized and documented code. In any case, I hope this thread could be of help to someone else.
Cheers,
KrisFebruary 21, 2018 at 5:05 pm #8839
Andrew MisplonKeymasterNo worries at all. That function should probably be in the WooCommerce template tags file. I’m sure this will be helpful to other users.
All the best 🙂 Chat soon. Cheers.
August 16, 2020 at 3:31 am #14844
Vlad777ParticipantThanks, very helpful.
- AuthorPosts
You must be logged in to reply to this topic.