Tagged: , ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #407735

    Hi,
    I’d like to add the cart count in front of the cart icon in the little cart object that appears on the right side of the menu once you have objects in your cart.

    #408294

    Hi radugidei!

    Are you trying to display how many items are in your cart to the left of the icon? Something like this?

    3x items in cart [cart icon]
    

    Go ahead and take a screenshot highlighting exactly what your trying to do so we can get a better idea.

    Best regards,
    Elliott

    • This reply was modified 9 years, 7 months ago by Elliott.
    #408300

    Hi Elliot,
    yes, that’s exactly what I’m trying to do.

    #408822

    I’m also looking for a method of displaying the number of items in the cart, either where the existing cart option is, or in one of the top menus. Here are some woocommerce examples:

    http://demo2.woothemes.com/?name=peddlar
    http://demo2.woothemes.com/?name=fashionable

    #409936

    Hi!

    Open up /enfold/config-woocommerce/config.php and around line 1465 you should see this.

    $output .= "<ul {$id} class = 'cart_dropdown' data-success='".__('was added to the cart', 'avia_framework')."'><li class='cart_dropdown_first'>";
    

    And this on the next line.

    $output .= "<div class = 'price_display'>".$woocommerce->cart->cart_contents_count."x items in cart</div>";
    

    And then add this to your custom CSS.

    .price_display {
      position: absolute;
      right: 60px;
      top: 3px;
      width: 100px;
    }

    Regards,
    Elliott

    #409993

    Thanks for the reply Elliott. I found the code at 802 (I’m guessing you’re using a different file version or 1465 was a typo), and added the new line. It works in the parent theme, but I failed to get it to work when I moved a copy of the file to a child theme. It’s probably a little oversimplified in that there is no monetary total (I failed to mention this earlier), and it’s not set up to reflect ‘item’ versus ‘items’.

    I’ve found an addon that helps on the larger resolutions (https://wordpress.org/plugins/woocommerce-menu-bar-cart/), but am still trying to figure out a solution for smartphone screen sizes (I’ve discovered that the default Enfold cart isn’t working well on portrait iPhone).

    I feel that as Enfold stands currently it works well for a business site that also wants a discreet shop, but I doubt I’d try to use it again for a site that is predominantly a shop. I’m going to head over to your feature request area and add some requests ;-)

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Add cart count in front of cart symbol’ is closed to new replies.