• Resolved naghamasalman

    (@naghamasalman)


    Hello,
    can we add a text beside the quantity in woocommerce cart when incrementing and decrementing for example to be 1 Month 2 Months

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hey @naghamasalman,

    One approach you could take is copying the WooCommerce template file woocommerce/templates/cart/cart.php to your theme and adding your additional text to that file.

    Below is a document describing how to override WooCommerce template files from within a WordPress theme.

    https://docs.woocommerce.com/document/template-structure/

    I hope this helps.

    Thread Starter naghamasalman

    (@naghamasalman)

    But can you help where in the files exactly can i add the word Month beside the incremented number.
    im able to access the files on the server and already changed some things and it worked.

    Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hey @naghamasalman

    Withing the WooCommmerce template file woocommerce/templates/cart/cart.php you would look for the section of code which starts with this below.

    <td class="product-quantity" data-title="<?php esc_attr_e( 'Quantity', 'woocommerce' ); ?>">.

    Within that section, you can try adding your custom code. You may also need to style that with some custom CSS for positioning etc.

    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Quantity edit’ is closed to new replies.