Archived topic
Prime library add cart in the widget
16 replies · Started by roadlink on September 29, 2020
Hi,
I read below post and exactly need same thing. But couldn't find solution there.
https://generatepress.com/forums/topic/prime-library-site-cart-location/
Hey guys, I’m customizing the “Prime” template from the site library.
I want to replace the text “GP | Gutenberg | Woo” in Header the Widgets with a shopping cart/basket, and remove the existing cart/basket icon.
In short, I want to relocate the cart to the very top right corner in place of the “GP | Gutenberg | Woo” text as I want it to be as easy as possible to checkout (location is important)
-I’ve figured out how to edit/resize the text widget with CSS, I tried removing that in the Customizer and adding the “Cart” widget, but that adds the word and not the cart/basket symbol
Hi there,
My solution should still work:
https://generatepress.com/forums/topic/prime-library-site-cart-location/#post-1242400
What issue are you having?
Hi Leo,
Yes, Indeed I read that post before open this one.
But couldn't understand how to start, sorry :(
Go to Appearance > Widgets > Header to remove the default text widget then add in the cart widget:
https://www.screencast.com/t/32bRy7zVN2
Hi Leo,
Thanks for reply.
I was trying to add cart icon like in the menu.
But your suggestion added whole cart content.
https://prnt.sc/uqsaik
Ahh unfortunately our cart icon option only works in the menu.
Sorry about that!
:) No problem, is there any way to take it there?
Sorry not sure what you mean by take it there?
The cart icon from GP only works in the primary navigation currently.
The cart icon from GP only works in the primary navigation currently.
Thanks, do you know any other method to show cart in header widget?
Not urgent, please take your time.
thanks
The cart widget is from WooCommerce plugin itself.
Maybe there is a plugin out there that offers a similar option with a better appearance?
Hi again,
I saw a site which is using Generatepress. It has cart icon just next the search bar. (when you scrool a bit down)
https://prnt.sc/vas75y
https://shopdesign2.key4dev.nl/product-categorie/computers-laptops/
Can it be done in this case?
The top part (in green) is actually the primary navigation and the bottom part (in red) is using the secondary navigation which is why it's able to use the cart icon from GP.
Hi, I was wondering if there is already a way to display the shopping cart icon in a custom location. Maybe via a hook?
Hi there,
add the following PHP Snippet to your site:
add_shortcode( 'wc_cart_menu_items', function() {
ob_start();
echo generate_wc_do_cart_menu_item();
return ob_get_clean();
} );
then you can add the [wc_cart_menu_items] shortcode to anywhere you need it.
Hi David,
I even forget that I asked about this but solution is great.
thanks