[Resolved] Change cart menu and breadcrumb

Home Forums Support [Resolved] Change cart menu and breadcrumb

Home Forums Support Change cart menu and breadcrumb

Viewing 15 posts - 16 through 30 (of 32 total)
  • Author
    Posts
  • #689060
    Tom
    Lead Developer
    Lead Developer

    I’m not sure if it will work, but you can try replacing:

    WC()->cart->get_cart_subtotal()

    With:

    WC()->cart->get_subtotal()

    Unfortunately I’m not super familiar with the WooCommerce code base, so I’m not 100% sure on this one.

    #689147
    Caroline

    If I do that change the amount is without tax. The same thing happen if I change it to
    WC()->cart->get_cart_total()

    But I just keep the prices in cart with tax so its not a big problem. I have made a new topic to fix the including tax text.

    #689158
    Caroline

    Is there anyway to get the css code to move the cart to the left on mobile too?

    #689467
    Tom
    Lead Developer
    Lead Developer

    You could do something like this:

    @media (max-width: 768px) {
        .inside-navigation {
            display: flex;
        }
    
        .menu-toggle {
            order: 1;
        }
    
        .mobile-bar-items {
            order: 3;
        }
    
        .wc-mobile-cart-items {
            order: 2;
            margin-right: auto;
        }
    }

    If you need to support old browsers, you can run that code through this tool: https://autoprefixer.github.io/

    #689588
    Caroline

    Thank you ๐Ÿ™‚
    I canโ€™t figure out how to remove (inkl. mva) i my navigation. Could you change to code to just hav a number of items, and not (1)?

    #689681
    Tom
    Lead Developer
    Lead Developer

    So just the number without the brackets?

    #689704
    Caroline

    Yes

    #690061
    Tom
    Lead Developer
    Lead Developer
    #690081
    Caroline

    Thank you. The amount was still there but I removed
    <span class="amount"><?php echo wp_kses_data( WC()->cart->get_cart_subtotal() ); ?></span>

    hope that was the right ting to remove to only show the numbers of items

    #690091
    Caroline

    When I use this css my mobilenavigation get like this https://ibb.co/gW0hrz

    @media (max-width: 768px) {
        .inside-navigation {
            display: flex;
        }
    
        .menu-toggle {
            order: 1;
        }
    
        .mobile-bar-items {
            order: 3;
        }
    
        .wc-mobile-cart-items {
            order: 2;
            margin-right: auto;
        }
    }

    But I want it like this, just change place on the search and cart. https://ibb.co/jWrNrz

    #690320
    Tom
    Lead Developer
    Lead Developer
    #690346
    Caroline

    I did and then it looks like the last image in my post. But the search and cart should change place.

    #690872
    Tom
    Lead Developer
    Lead Developer

    Looks like you added a maintenance page – any chance you can send me login details so I can see the site?: https://generatepress.com/contact

    Be sure to mention this topic ๐Ÿ™‚

    #690964
    Caroline

    I turned off the maintenance mode now ๐Ÿ™‚

    #691180
    Tom
    Lead Developer
    Lead Developer

    Try this function:

    add_action( 'after_setup_theme', function() {
        remove_action( 'generate_inside_navigation', 'generatepress_wc_mobile_cart_link' );
        add_action( 'generate_inside_navigation', 'generatepress_wc_mobile_cart_link', 99 );
    } );
Viewing 15 posts - 16 through 30 (of 32 total)
  • You must be logged in to reply to this topic.