• Resolved danzmwl

    (@danzmwl)


    Hello, great plugin!

    I have a question – can the Price, Subtotal, and Total fields be removed from the Cart and Checkout?

    Removing these now empty fields will help to make the quote checkout experience more understandable for the end user.

    Where the fields are:
    Price and Total in the Cart
    Subtotal and Total in the Cart Totals
    Subtotal and Total in the Checkout ‘Your Order’ section

Viewing 15 replies - 1 through 15 (of 19 total)
  • Yes, do it with CSS.

    .class{
    dispay:none;
    }

    Thread Starter danzmwl

    (@danzmwl)

    Thanks for this @designful

    However this doesn’t seem to work for me.
    Could you please give further details as to this?

    Plugin Author pinal.shah

    (@pinalshah)

    Hi @danzmwl,

    As long as the plugin is not setup to display prices on the front end, no total amounts should be displayed on the Cart & Checkout pages.

    Can you kindly confirm that the settings are correct and yet the prices are being displayed for you on the Cart & Checkout pages?

    Thanks,
    Pinal

    Thread Starter danzmwl

    (@danzmwl)

    Hello @pinalshah

    Yes no prices are being shown at all on any page of the website, the plugin works perfectly.

    I’m referring to the actual words in the cart and checkout of Price, Subtotal, and Total.

    They are now at the top of empty columns. Is there a way to remove the words or columns, to make the checkout process more plain looking?

    Plugin Author pinal.shah

    (@pinalshah)

    Hi @danzmwl,

    Understood. This can be achieved using css changes. I’ll look into this further and get back to you with an update at the earliest.

    Thanks,
    Pinal

    • This reply was modified 3 years, 9 months ago by pinal.shah.

    +1
    It would be better without empty fields Total & Subtotal in cart and checkout.
    I can change css, but it doesn’t have to be that way.

    Plugin Author pinal.shah

    (@pinalshah)

    Hi @danzmwl,

    Sorry, I missed replying to you earlier. The below CSS changes should help.

    tr.woocommerce-cart-form__cart-item td.product-price {
        display: none;
    }
    tr.woocommerce-cart-form__cart-item td.product-subtotal {
        display: none;
    }
    th.product-price {
        display: none;
    }
    th.product-subtotal {
        display: none;
    }
    .cart_totals h2 {
        display: none;
    }
    table.shop_table:nth-child(2) {
        display: none;
    }

    Agreed @psih0. In case if you wish to contribute to the plugin, please feel free to raise a PR on GitHub here.

    Thanks,
    Pinal

    Thread Starter danzmwl

    (@danzmwl)

    Works perfectly @pinalshah thank you.

    Thread Starter danzmwl

    (@danzmwl)

    Is there any way to get this code to work on mobiles as well? It works great on desktop screens, but the issue still occurs on mobile screens.

    Plugin Author pinal.shah

    (@pinalshah)

    Hi @danzmwl,

    You can try adding css for specific media sizes like

    @media (min-width: 530px){
    }

    and so on as needed.

    Thanks,
    Pinal

    • This reply was modified 3 years, 8 months ago by pinal.shah.
    Thread Starter danzmwl

    (@danzmwl)

    Thanks for this @pinalshah

    Sorry, could you please give further details as to how to add this sizing css in? I’m a bit inexperienced as to some of this css coding.

    @danzmwl go to appearance -> customize and on the bottom of the left side menu there’s a panel that lets you add CSS statements which will override the current theme.
    My solution for this topic is

    /*Cart page*/
    .cart td:nth-child(6),
    .cart td:nth-child(4),
    .cart th:nth-child(4),
    .cart th:nth-child(6),
    .cart_totals .shop_table,
    .cart_totals h2,
    /*Hanging cart*/
    .woocommerce-mini-cart__total,
    .header-cart-top-link-right,
    /*Checkout page*/
    .checkout th:nth-child(2),
    .checkout tfoot,
    /*Order received page*/
    .woocommerce-order-received tfoot
    {
    	display:none;
    }

    You can add css specially for small screen by putting the statements inside the media wrapper

    @media (min-width: 530px)
    {
      .class
      {
      }
    }

    Hi @pinalshah My issue is somewhat similar to this one, Since the products need to have some price(dummy) to upload them, That price is shown in the Total field of the table while the user is checking out for Request Quote. I just want it to be hidden when the user is requesting for quote AND it should be visible when the quote is marked as complete and the user is paying for the order at the checkout page. It will give a good user experience to let the customer know they are paying this much at the checkout page after getting the quote from the admin.
    Although the CSS solution works for hiding But it hides even after the quote is completed and checking out for payment.
    Your help will be much appreciated.! Thanks!

    hi, @tuseeqtoor, I solved this creating a different css class for the order-recieved endpoint checkout page depending on the order status:

    add_filter( 'body_class', 'thankyou_class' );
    function thankyou_class( $classes ){
    	if (is_wc_endpoint_url( 'order-received' )){
    		global $wp;
    
    		$order_id  = absint( $wp->query_vars['order-received'] );
    
    		$order = new WC_Order( $order_id );
    		if ( in_array($order->get_status(), ['completed', 'on-hold']) )
    		{
    			$classes[]='ready-to-go';
    		}
    		elseif ( $order->get_status() === 'pending')
    		{
    			$classes[]='pending';
    		}
    	}
    	return $classes;
    }

    You can use the same for the page title as well:
    add_filter( 'the_title', 'thankyou_title', 999, 2 );

    My issue is similar to others in this thread, except my setup is:

    I have categories only on the shop page, shown without prices.

    In the cart, I would like to have the Price and Subtotal amounts showing for each item as currently they are not. Thanks!

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Removing Price, Subtotal, and Total field from the Cart and Checkouts’ is closed to new replies.