Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi,
    you can hide the bundled items in cart page by adding the following CSS code in your site:

    tr.cart_item.yith-wcpb-child-of-bundle-table-item {
        display: none;
    }

    Best Regards
    YIThemes

    Hello – I would love this same functionality, but the css doesn’t seem to affect the cart. I can’t find that class anywhere in the actual code either.

    I actually just realized that this code is working on the actual cart, but not in the mini cart in my sidebar. Any way to eliminate that one too?

    Just override the mini-cart template file and when you see something like:

    <?php foreach ( $items as $key => $item ): ?>

    Put just above the line item:
    <?php if( isset($item['bundled_by']) ) { continue; } ?>

    price4you

    (@price4you)

    I don’t have this code in mini-cart…

    Just:
    <?php
    foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
    $_product = apply_filters( ‘woocommerce_cart_item_product’, $cart_item[‘data’], $cart_item, $cart_item_key );
    $product_id = apply_filters( ‘woocommerce_cart_item_product_id’, $cart_item[‘product_id’], $cart_item, $cart_item_key );

    if ( $_product && $_product->exists() && $cart_item[‘quantity’] > 0 && apply_filters( ‘woocommerce_widget_cart_item_visible’, true, $cart_item, $cart_item_key ) ) {
    $product_name = apply_filters( ‘woocommerce_cart_item_name’, $_product->get_title(), $cart_item, $cart_item_key );
    $thumbnail = apply_filters( ‘woocommerce_cart_item_thumbnail’, $_product->get_image(), $cart_item, $cart_item_key );
    $product_price = apply_filters( ‘woocommerce_cart_item_price’, WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key );
    $product_permalink = apply_filters( ‘woocommerce_cart_item_permalink’, $_product->is_visible() ? $_product->get_permalink( $cart_item ) : ”, $cart_item, $cart_item_key );
    ?>

    price4you

    (@price4you)

    How can I remove this from code?

    [Moderator note: Please, no bumping.]

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to remove not necessary bundled products in cart page’ is closed to new replies.