Change "Quantity" text in single product page

This topic has 13 replies, 4 voices, and was last updated 6 years, 9 months ago ago by Rose Tyler

  • Avatar: fnezarati
    fnezarati
    Participant
    September 4, 2017 at 17:12

    Hi, I wonder how I can change “Quantity” on top of “Add to the cart” in single product page to “Quantity / Meter”?

    12 Answers
    Avatar: laranz
    Laranz
    Participant
    September 5, 2017 at 04:23

    Hi,

    You can translate those strings using this kb article: https://www.8theme.com/documentation/xstore/theme-translation/base-theme-translation/

    Let us know,

    Thanks,
    laranz.

    Avatar: fnezarati
    fnezarati
    Participant
    September 5, 2017 at 11:13

    Hi, I don’t want to translate theme to other language just because of the purpose of my website I need to have “Quantity / Meter” instead of just “Quantity” for adding products to shopping cart.

    Avatar: fnezarati
    fnezarati
    Participant
    September 5, 2017 at 11:50

    I tried the plugin but it seems its not change anything

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 5, 2017 at 12:13

    Hello,

    In this case you may edit “Quantity” text in xstore/woocommerce/global/quantity-input.php file.
    Please, do all the changes in child theme to avoid problem with next theme update https://www.8theme.com/documentation/docs/child-theme/

    Regards

    Avatar: fnezarati
    fnezarati
    Participant
    September 5, 2017 at 12:29

    Hi, the file you mentioned “../woocommerce/global/quantity-input.php”, I don’t have it!!

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 5, 2017 at 12:40

    Oh sorry, xstore/framework/woo.php file.

    Regards

    Avatar: fnezarati
    fnezarati
    Participant
    September 5, 2017 at 12:44

    the other thing that you mentioned to update do all the changes in chid theme, I don’t know how to do it because I only have style.css, function.php and screenshot.png in my themes/xstore-child folder

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 5, 2017 at 12:56

    Yes, please read documentation https://codex.wordpress.org/Child_Themes
    you need copy this function http://prntscr.com/ghc2e1 in function.php file of child theme and there make text changes.

    Regards

    Avatar: fnezarati
    fnezarati
    Participant
    September 5, 2017 at 13:05

    it is change now. Thank you so much for your help.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 5, 2017 at 13:09

    You’re welcome!

    Regards

    Avatar: lemc1414
    lemc1414
    Participant
    January 26, 2018 at 21:55

    Sorry, I have the same problem. I tryed to follow your instruction but I must have done something wrong because it didnt work for me. I want to change he text “quantity” to “people”

    This is what I wrote:
    if ( ! function_exists( ‘etheme_single_quantity_text’ ) ) {
    function etheme_single_quantity_text() {
    global $product;
    if ( !$product->is_type( ‘grouped’ ) ) printf( ‘<span class=”qty-span”>’ esc_html_( ‘people’, ”xtore’ ) );
    }
    }

    Im sorry for not understanding. I hope you can help me.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 29, 2018 at 10:22

    Hello, @lemc1414

    To avoid editing of php files I would recommend using translation files to change it. Use Loco Translate plugin https://www.8theme.com/demo/docs/xstore/#translation , create English translation and just change necessary strings to what you need.

    Regards

  • Viewing 13 results - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.