[Resolved] Display cart

Home Forums Support Display cart

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1398479
    Daniele

    Hi guys,
    can you please tell me how to output the Woocommerce cart in a template I’m building?

    I found this but I think I’m missing something <?php echo generatepress_wc_cart_link(); ?>

    thanks

    #1399206
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Would this be within your content?

    WooCommerce itself has a cart widget you can call with PHP: <?php the_widget( 'WC_Widget_Cart', 'title=' ); ?>

    #1400209
    Daniele

    Hi Tom, it worked with <?php echo generatepress_wc_cart_link(); ?>
    I had to add this to style it:

    a.cart-contents:not(.has-svg-icon).shopping-bag:before, .secondary-navigation a.cart-contents:not(.has-svg-icon).shopping-bag:before {
    content: “\f290”;
    display: inline-block;
    font-family: “GP Premium”;
    speak: none;
    font-style: normal;
    font-weight: 400;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    }

    #1401318
    Tom
    Lead Developer
    Lead Developer
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.