Home Forums WoodMart support forum up sell and cross sell titles

up sell and cross sell titles

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #647188

    cristian-1741
    Participant

    Good morning,
    I have a problem with editing some titles:
    On my site http://www.packorama.it, on the single product page, (example https://packorama.it/catalogo/flacone-aries-250-ml-trasparente/)
    we find the title of upsell and related products, which
    in Italian are called “Ti potebbero interessare…” and “Prodotti correlati”.
    We would like to change these texts, but even our programmer has not succeeded. I would like to know if it is possible to change them or this possibility is not provided.

    If it is possible, we would like to change:
    – “Ti potrebbe interessare…” make it become “Puoi abbinarlo con…”
    – “Prodotti correlati” make it become “Altri prodotti scelti per te”.

    thank you very much for your support,

    best,

    #647425

    Hung Pham
    Keymaster

    Hi cristian-1741,

    Thanks for reaching to us.

    + In order to change / translate words. Please make sure you synced the strings first before changing / translating WooCommerce, WoodMart Core plugins and WoodMart theme. You can refer to article

    https://xtemos.com/docs-topic/theme-translation/
    https://xtemos.com/docs-topic/how-to-make-woodmart-multilingual-with-wpml/

    + You are also need to select the language for the backend and theme settings for admin from the admin user profile, please edit the user’s profile and then select the language for that user it will show the same on the backend.

    Regards,

    #649670

    cristian-1741
    Participant

    Hi, thank you so much for your support. Unfortunately, I don’t think I understood.

    + I tried to synchronize the strings, but I couldn’t find how to do it in the guides. I tried doing it in WPML > Theme and Plugins Localization > selecting the theme and clicking “Scan selected themes for strings.” However, I don’t think this is what you mean, because it doesn’t solve my issue.
    Actually, I don’t want to modify the translation, but rather change the title in the primary language (and then, consequently, the translation).

    + Regarding the second point, unfortunately, I don’t understand what you mean… Do I need to change the language in my admin profile? (see screenshot)
    I tried searching for these titles with the profile set to Italian and also in English, but nothing changed..

    Thank you very much!
    best,

    Attachments:
    You must be logged in to view attached files.
    #649779

    Hung Pham
    Keymaster

    Hi cristian-1741,

    You need to translate WooCommerce plugin as well https://ibb.co/203CcGkS

    Regards,

    #650471

    cristian-1741
    Participant

    Hi Hung,
    thank you very much for your work.
    I saw that you changed the titles to Italian, thank you!
    I see that the English texts, on the other hand, have remained the same, can I change them? From there it looks like I can’t edit them…
    I would like to change them because now the translation no longer matches,
    thank you very much,

    best,

    #650711

    Hung Pham
    Keymaster
    #651048

    cristian-1741
    Participant

    Thank you, I followed the guide but it does not solve my problem, as you can see from the screenshots, you cannot change the text ‘You may also like’. So I assume you simply cannot change it.
    If I change its source language, as the guide says, that text remains unclickable and I can’t change it…

    #651124

    Hung Pham
    Keymaster

    Hi cristian-1741,

    Try to use the code below instead of yours. Define the code in the functions.php file in your child theme.

    		add_filter('woodmart_upsells_products_args', function ( $args ) {
    			$args['element_title'] = 'Customers also purchased...';
    
    			return $args;
    		} );

    Regards,

    #651563

    cristian-1741
    Participant

    thank you very much.
    I inserted in the function:

    add_filter(‘woodmart_upsells_products_args’, function ( $args ) {
    $args[‘element_title’] = ‘You can combine it with…’;

    return $args;
    } );

    but now unfortunately, I see ‘You can combine it with…’ in both Italian and English, and if I go looking for it in the strings, again it cannot be changed.

    Can I put the translation into Italian?
    thanks,
    best,

    Attachments:
    You must be logged in to view attached files.
    #651643

    Hung Pham
    Keymaster

    Hi cristian-1741,

    I replaced code above with below and synced, now you can translate it into IT language like normal. https://ibb.co/tTTQBpdn

    add_filter('woodmart_upsells_products_args', function ( $args ) {
    	$args['element_title'] = __('You can combine it with...', 'woodmart');
        return $args;
    } );

    Regards,

    #651681

    cristian-1741
    Participant

    Thank you very much Hung, it works now!

    I also wanted to change the title underneath, the one for related products, which is now :
    In Ita > “Altri prodotti scelti per te ”
    In Eng > “Related products”
    I would like to do the same thing here: change the English from ‘Related products’ to ‘Other products selected for you’
    and then be able to change the translation if necessary,
    do you have a code to give me?

    thank you very much!

    #651773

    Hung Pham
    Keymaster

    Hi cristian-1741,

    You can try this trick if you want to keep the original files intact.

    1. Copy the existing English .po file (e.g., en_US.po) from theme.

    2. Edit it to change the msgstr values to your desired text.

    3. Save it with a slightly different locale (e.g., en_GB.po) and upload it to the languages folder.

    4. In WPML > Languages, add en_GB as a new language and set it as the default (or switch to it temporarily). This tricks WPML into using your modified English strings.

    Regards,

    #652088

    cristian-1741
    Participant

    Hi, thank you for your suggestion!

    I checked the /wp-content/themes/woodmart/languages/ folder, but I only see a woodmart.pot file — there are no .po or .mo files there.

    Because of that, I don’t think I can follow your proposed solution, unless the .po file is located somewhere else that I’m not aware of…it should already exist somewhere in the theme or plugin folders?

    Thanks in advance for your help!

    best,

    #652344

    Hung Pham
    Keymaster

    Hi cristian-1741,

    Please follow this article https://wpml.org/faq/how-to-generate-a-po-file-for-a-plugin-or-a-theme/

    Regards,

Viewing 14 posts - 1 through 14 (of 14 total)