Reordering table content in cart page

I’m trying to make my cart page be more like the woocommerce blocks cart page. So I’m trying to move the x button (remove item), price and quantity into the product column. Does anyone have any idea how to do it?

You need to override the templates/cart/cart.php template with your own format. You can do this by adding template files to your theme, as described here.

Here’s what it should look like

Yes, that’s what I’m doing already but I’m not quite sure how to in the php. First part of it goes like this:

<?php do_action( 'woocommerce_before_cart_table' ); ?>

<table class="shop_table shop_table_responsive cart woocommerce-cart-form__contents" cellspacing="0">

    <thead>

        <tr>

            

            <th class="product-thumbnail">&nbsp;</th>

            <th class="product-remove">&nbsp;</th>

            <th class="product-name"><?php esc_html_e( 'PRODUCT', 'woocommerce' ); ?></th>

            <th class="product-price"><?php esc_html_e( 'Price', 'woocommerce' ); ?></th>

            <th class="product-quantity"><?php esc_html_e( 'Quantity', 'woocommerce' ); ?></th>

            <th class="product-subtotal"><?php esc_html_e( 'TOTAL', 'woocommerce' ); ?></th>

        </tr>

    </thead>

    <tbody>

        <?php do_action( 'woocommerce_before_cart_contents' ); ?>

Edit: not sure if I’m making much sense, I get that I need to reorder the table. I’ve moved things around to see what effect they have but its not actually doing what I want it to

I figured it out :relaxed:. I decided to inspect element one last time to see how the woocommerce blocks plugin actually laid it out and saw that it goes like tr-> td ->div. Then saw that mine had no div anywhere. Do I know why it works? Of course not but I reordered it and done!!
cartt|690x310

Sponsor our Newsletter | Privacy Policy | Terms of Service