• Resolved allstarsft

    (@allstarsft)


    Hi,

    Please see attached screenshot for the issue. Currently I had to set the width to 550px, but ideally I need this Shipping column to be colspan=”3″ as I added additional column at the Product name column so that the TH labels’ width can be shorter.

    As my Product names (Actual ones) can be very long, If I add the width only for Product name, it would also extend the width of the TH labels from Subtotals and below.

    Thank you.

    Regards

    ALLSTARS-FT

    Note: I used Chrome Inspector found the php coding — TD line which I need to add the colspan=”3″.. but I’m unable to locate the exact location where this coding is:

    I was told by Flexible Shipping plugin developers to try adding the code to cart-shipping.php but when I tried, it didn’t work. See code below :

    <?php if ( is_cart() ) : ?>
    	<td data-title="<?php echo esc_attr( $package_name ); ?>">
    	elseif ( is_checkout() ) {
    	<td data-title="<?php echo esc_attr( $package_name ); ?>" colspan="3" > 
    	}

    Hope an expert can guide me on this. Thanks!

    • This topic was modified 1 year, 1 month ago by allstarsft.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi there @allstarsft ??

    Welcome to WooCommerce Support. I’d be happy to help you with this.

    Checkout – Shipping Methods display in Order Review Table – Add Colspan to TD

    WooCommerce template files contain the?markup?and?template structure?for?frontend and HTML emails?of your store.

    Feel free to check out the related documentation, linked here.

    I trust that points you in the right direction, but if you have more questions, let us know.

    We’re happy to help.

    Thread Starter allstarsft

    (@allstarsft)

    @anastas10s Thanks for your reply. I know how to edit the template files, but need to find out which is the correct file to edit for this issue.

    As per my above post, I had tried but failed. Maybe its the wrong template file? I need this for the Checkout Page — where the shipping methods appear.

    Thanks.

    Note : In fact doing the addition of the coding to cart-shipping.php caused Critical error for the Cart page — Cart Totals section.

    • This reply was modified 1 year, 1 month ago by allstarsft.
    Thread Starter allstarsft

    (@allstarsft)

    Was wondering which template I should use to allow for TD colspan=”3″ to be added so that Shipping methods shown will span across 3 columns.

    Is it still cart-shipping.php — I just want it in Check out page where the Shipping methods are ?

    • This reply was modified 1 year, 1 month ago by allstarsft.
    • This reply was modified 1 year, 1 month ago by allstarsft.
    Thread Starter allstarsft

    (@allstarsft)

    Ah!! After some trial and error, I might have found the answer.

    in Cart-shipping.php (Cart Page) — I just indicate TD colspan=”3″ without if Cart and else Checkout statement.

    So eventually the coding is just :

    <tr class="woocommerce-shipping-totals shipping">
    	<th><?php echo wp_kses_post( $package_name ); ?></th>
    	
    	<td colspan="3" data-title="<?php echo esc_attr( $package_name ); ?>">

    Do let me know if this is the correct way?

    Thanks. (Image below — to show it works, really span across 3 cols)

    anastas10s

    (@anastas10s)

    Hey @allstarsft ??

    Thank you so much for adding your input! LGTM (Looks Good To Me). Some of our customers might indeed find this guide helpful!

    We appreciate you being an active part of the community ??

    I’ll go ahead with marking this thread as resolved now. Feel free to open a new one, should you need to reach out about something else.

    Have a wonderful day!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Checkout – Shipping Methods display in Order Review Table – Add Colspan to TD’ is closed to new replies.