Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1262428
    Lee
    Participant

    Hello.

    I need some help! I am building a Woocommerce site with X and Ubermenu (both fantastic) and before we activated Ubermenu we setup the basket to show total items and subtotal (see 1 in pics).
    After activating though this moves to small text on the left (see 2 in pics).
    I have managed to make the Ubermenu show a basket link and go to the right of the menu (thanks to the awesome tutorial videos) but my question is:

    How do you add the items and subtotal into where the basket is (see 3 in pics)?

    Thank you for any help on this.

    Regards.

    Lee.

    #1262449
    Paul R
    Moderator

    Hi,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation.

    #1262483
    Lee
    Participant
    This reply has been marked as private.
    #1262665
    Nabeel A
    Moderator

    Hi again,

    Thank you for providing the URL. Please add the following code in your Customizer via Appearance > Customize > Custom > Edit Global CSS:

    .x-menu-item.x-menu-item-woocommerce {
        float: right !important;
        margin-right: 10px !important;
        margin-top: 15px !important;
    }

    Let us know how this goes!

    #1263493
    Lee
    Participant

    Hello,

    Unfortunately this does nothing.

    Before I activated Ubermenu I managed to get it to float right. What it is im after is to get the cart number of items and subtotal inside the Ubermenu item on the right with the basket.

    Is there any shortcode that can call the subtotal and number of items from woocommerce?

    Thank you.

    #1263496
    Lee
    Participant

    Hi again.

    If it helps here is a mockup of what I am trying to achieve.

    Thanks.

    #1263507
    Christopher
    Moderator

    Hi there,

    Please provide us with login credentials so we can take a closer look.

    Thanks.

    #1263512
    Lee
    Participant
    This reply has been marked as private.
    #1263524
    Christopher
    Moderator

    Please provide us with WP dashboard credentials.

    Thanks.

    #1263541
    Lee
    Participant
    This reply has been marked as private.
    #1263784
    Rad
    Moderator

    Hi there,

    The cart icon and the cart price are on different menu items which are impossible to style them as one element. It’s like having two different menu items with different captions. The solution is to make them in one element, let’s try this https://community.theme.co/forums/topic/problem-with-shopping-and-search-icon-with-ubermenu/

    And make sure your cart icon and price menu item are removed to avoid conflicts on this new one.

    Thanks!

    #1264239
    Lee
    Participant

    Thank you so much.

    I have managed to use a combo of different solutions and got it to work.

    For anyone else wanting this:

    functions.php in child:

    // Custom Cart menu when uberMenu is active
    function x_woocommerce_navbar_menu_item( $items, $args ) {
      if ( X_WOOCOMMERCE_IS_ACTIVE && x_get_option( 'x_woocommerce_header_menu_enable' ) == '1' ) {
        if ( $args->theme_location == 'primary' ) {
          if ( ! class_exists( 'UberMenu' ) ) {
            $items .= '<li class="menu-item x-menu-item x-menu-item-woocommerce">'
                      . '<a href="' . x_get_cart_link() . '" class="x-btn-navbar-woocommerce">'
                        . x_woocommerce_navbar_cart()
                      . '</a>'
                    . '</li>';
          } else {
            $items .= '<li class="ubermenu-item ubermenu-item-level-0 menu-item x-menu-item x-menu-item-woocommerce">'
                      . '<a href="' . x_get_cart_link() . '" class="ubermenu-target x-btn-navbar-woocommerce">'
                        . x_woocommerce_navbar_cart()
                      . '</a>'
                    . '</li>';
          }
        }
      }
      return $items;
    }
    add_filter( 'wp_nav_menu_items', 'x_woocommerce_navbar_menu_item', 9999, 2 );

    Custom CSS for the rest:

    .x-menu-item.x-menu-item-woocommerce {
        float: right !important;
    }
    .x-menu-item.x-menu-item-woocommerce span.outer {
    	margin-right: 10px !important;
    	position:relative;
    }
    .x-menu-item.x-menu-item-woocommerce span.outer:before {
        content: "\f07a";
    	margin-right: 10px !important;
        font-family: FontAwesome;
        
     }
    #1264275
    Christian
    Moderator

    You’re welcome and thanks for sharing.

  • <script> jQuery(function($){ $("#no-reply-1262428 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>