• 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=”4″ 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=”4″.. but I’m unable to locate the exact location where this coding is:

    • This topic was modified 1 year, 1 month ago by allstarsft.
Viewing 15 replies - 1 through 15 (of 19 total)
  • Thread Starter allstarsft

    (@allstarsft)

    — It should look like this after adding td colspan=”4″ or the number could be “3”

    • This reply was modified 1 year, 1 month ago by allstarsft.
    • This reply was modified 1 year, 1 month ago by allstarsft.
    Plugin Support tograczyk

    (@tograczyk)

    Hi @allstarsft, thank you for reaching out.

    I’m afraid, that the code and elements you describe are not added by our plugin. Based on what you have shown, it seems to me that you would have to make the changes to the theme / WooCommerce checkout itself.

    Our solution allows you to create shipping methods, but does not affect the design of the checkout.

    At this stage, I would recommend trying to contact WooCommerce support: https://www.ads-software.com/support/plugin/woocommerce/.

    We are happy to help with questions about our plugins, please let us know if you have any additional queries!

    Best regards,
    Tomek

    Thread Starter allstarsft

    (@allstarsft)

    Thanks for your reply.

    I managed to edit those fields that does not belong to your plugin.

    Its only your plugin’s displayed section (with the different shipping methods), that I was unable to edit.

    I need to know where is the “td” coding for your plugin which print out all the shipping methods.

    (as per my screenshots of the td coding above, which I got from Chrome inspector)

    Thank you.

    Plugin Support Piotrek Bodera

    (@nerdontour)

    Hi @allstarsft,

    Please know that we’re unable to recreate this issue in our test environment. Therefore, as me colleague @tograczyk mentioned, the “td” you’re referring to has to be injected by a theme or a plugin you use.

    To check if there is no conflict with a plugin, please temporarily install and enable Storefront the official WooCommerce theme, and see if the problem persists. 

    Then, please disable plugins which are not ours or the WooCommerce itself. Then please enable plugins one by one, deleting cache, and check if the problem still occurs.

    Please let me know if you have any further questions or if there is something more I can help you with.

    Kind regards,

    Piotrek

    Thread Starter allstarsft

    (@allstarsft)

    Hmm, thanks for your reply.

    i am surprised that your Flexible shipping methods “view” at cart or checkout does not have any template php?

    As far as I understands, the section that I am referring to, actually only belongs to your plugin which should have the “td” php coding in your coding files for me to add the colspan in.

    Please check again, thanks.

    (There seems to be no other way I can manually add “colspan” in as i did for the other Woocommerce generated ones)

    Thanks.

    Plugin Support Piotrek Bodera

    (@nerdontour)

    Our plugin currently doesn’t have any styling features.

    All styling depends on your theme and WooCommerce plugins.

    Were you able to test if the issue persists with Storefront and with all other plugins deactivated?

    Thread Starter allstarsft

    (@allstarsft)

    To clarify further, there is no colspan css i think. It has to be added to the “td” coding in your php code.

    Could you just point me to where this set of coding is (where it displays all the shipping methods defined in the Cart / Checkout)?

    Plugin Author grola

    (@grola)

    Shipping methods are displayed by WooCommerce. You should look for it in the woocommerce/templates folder or in the theme folder in the woocommerce directory.

    Thread Starter allstarsft

    (@allstarsft)

    Thanks for your reply, grola.

    I edited the rest of the fields in woocommerce/templates folder but could not find the shipping methods as displayed by Flexible Shipping plugin, that was why I was asking here.

    I will check again the same Cart and Checkout templates but if someone knows where to find the Shipping methods defined template file, do let me know.

    Plugin Author grola

    (@grola)

    Have you checked the woocommerce folder in your theme? Or maybe you checked out another theme?

    Thread Starter allstarsft

    (@allstarsft)

    Hi @grola

    This coding can only be found in Cart-totals.php under Cart folder which I have it (/oceanwp-child-theme/woocommerce/cart/cart-totals.php)

    But in Cart page, the Shipping displayed is fine in its format, but I only want the colspan in Checkout page. Is that possible?

    Checkout page : review-order.php — does not have this line here, instead :

    <?php if ( WC()->cart->needs_shipping() && WC()->cart->show_shipping() ) : ?>
                <?php do_action( 'woocommerce_review_order_before_shipping' ); ?>
    			<?php wc_cart_totals_shipping_html(); ?> 
                <?php do_action( 'woocommerce_review_order_after_shipping' ); ?>  
    		<?php endif; ?>

    That was why I couldn’t find it.

    So my question now is how to only add colspan here for Checkout page – review-order.php template? : (If I add the colspan at cart-totals.php, it will also appear in Cart page?)

    Below code appears in cart-totals.php under Cart folder (same as screenshot of code earlier)

    <td data-title="<?php esc_attr_e( 'Shipping', 'woocommerce' ); ?>"><?php woocommerce_shipping_calculator(); ?></td>

    Thanks.

    Plugin Author grola

    (@grola)

    You can use conditional functions: is_cart and is_checkout: https://woocommerce.com/document/conditional-tags/

    Thread Starter allstarsft

    (@allstarsft)

    Ah! So add this into the Cart-totals.php file’s said coding?

    Thread Starter allstarsft

    (@allstarsft)

    Ok, @grola — I just tried to add the conditionals in — Cart-totals.php but it didn’t work. (I need the colspan in Checkout table only — Order Review)

    <?php if ( WC()->cart->needs_shipping() && WC()->cart->show_shipping() ) : ?>
    
    <?php do_action( 'woocommerce_cart_totals_before_shipping' ); ?>
    
    <?php wc_cart_totals_shipping_html(); ?>
    
    <?php do_action( 'woocommerce_cart_totals_after_shipping' ); ?>
    
    <?php elseif ( WC()->cart->needs_shipping() && 'yes' === get_option( 'woocommerce_enable_shipping_calc' ) ) : ?>
    
    <tr class="shipping">
    	<th><?php esc_html_e( 'Shipping', 'woocommerce' ); ?></th>
        if (is_cart()) { 
    	<td data-title="<?php esc_attr_e( 'Shipping', 'woocommerce' ); ?>"><?php woocommerce_shipping_calculator(); ?></td> 
      } elseif ( is_checkout() ) {
      <td colspan="4" data-title="<?php esc_attr_e( 'Shipping', 'woocommerce' ); ?>"><?php woocommerce_shipping_calculator(); ?></td> 
    }
    </tr>
    
    <?php endif; ?>

    if (is_cart()) {

    <td data-title=”<?php esc_attr_e( ‘Shipping’, ‘woocommerce’ ); ?>”><?php woocommerce_shipping_calculator(); ?></td>

    } elseif ( is_checkout() ) {

    <td colspan=”4″ data-title=”<?php esc_attr_e( ‘Shipping’, ‘woocommerce’ ); ?>”><?php woocommerce_shipping_calculator(); ?></td>

    }

    If this coding works, the column should have span across 4 columns and the longer Shipping remarks text would have become one liner instead of 2.

    Note: I have created extra empty columns — to match the top’s as Product name can be long and I have defined Quantity and Unit Price at the top as well.

    • This reply was modified 1 year, 1 month ago by allstarsft.
    • This reply was modified 1 year, 1 month ago by allstarsft.
    Plugin Author grola

    (@grola)

    Hi,

    this issue is not related to our plugin. This issue is related to WooCommerce or your theme.

    But maybe you’re modifying the wrong file. Check cart-shipping.php instead of cart-totals.php

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Checkout – Order Review Table – Colspan=”2″’ is closed to new replies.