New Landing How can we help? Themeforest Theme Support Uplift Product attribute with WPML

Viewing 10 posts - 1 through 10 (of 10 total)
  • Posted in: Uplift
  • #295944
    birdfamily
    Member
    Post count: 31

    Hi!
    I’m working on translating the site using WPML (with String Translation), but can’t get my head around few things.

    1) Attribute on variable product page (in this case “Source Language”).

    I’ve translated attribute name and terms/variables. All good in different languages on Cart and Checkout pages, where terms get translated and attribute is shown by its “Name” and gets translated in both languages.
    On product page (where attribute’s variation must be chosen), the attribute isn’t shown by its “Name”, but seems to show the last part of attribute_pa_source-language.
    Is it supposed to be like this or should it also be shown by “Name”? As I understand the attribute comes to product page from the uplift string “Choose a %s“.
    http://www.krutstravel.com/en/shop/language-cards-indonesian/

    2) Quickview button text.

    So far I’ve managed to translate only the text that appears in the dark box above Quickview button (on smaller screen).
    I’ve translated the jckqv string “Quickview” and the uplift string “Quickview”.
    The button text is the same in all languages, as it is entered Woocommerce > Quickview > Quickview Text.
    http://www.krutstravel.com/pood

    Hope you can help to point out, what or where should be done.

    Thank you!
    Henri the noob

    Attachments:
    You must be logged in to view attached files.
    #296223
    David Martin – Support
    Moderator
    Post count: 20834

    Hi Henri, don’t worry – you are not a noob, WPML is fairly complex.

    1) If you enable Twenty 16 theme, does this still happen? I think the issue really exists within the setup of WPML plugin.

    2) That would need to be also translated in the Quickview plugin also. Take a look here: http://krutstravel.com/wp-admin/admin.php?page=wpml-string-translation%2Fmenu%2Fstring-translation.php&search=Quickview

    Please contact WPML support and report this issue: https://wpml.org/forums/forum/english-support/

    Thanks.

    #296381
    birdfamily
    Member
    Post count: 31

    Hi!

    1) I tried it with Twenty 16, the attribute name was shown correctly by its Name. Though the layout is a bit different there, as the attribute name is outside the selection drop-down. I also tried to deactivate all plugins besides WPML and Swift Framework while using Uplift theme, but didn’t help.

    2) I have translated the string in the Quickview plugin, but it still shows the text entered in admin menu: Woocommerce > Quickview > WooCommerce Quickview Settings > Quickview Text.
    The uplift string “Quickview” did good job translating text in the small dark box above button, that I mentioned before.

    I will also report to WPML support.

    Thank you!
    Henri

    Attachments:
    You must be logged in to view attached files.
    #296807
    David Martin – Support
    Moderator
    Post count: 20834

    Hi Henri,

    I have had a look at the WPML backend and you seem to have it set correctly, I will need you to ask WPML about this also as I am slightly perplexed as to why the translations are not being picked up for both 1 & 2.

    We work closely with WPML to make sure all our themes are compatible, so let us know what they say or if they need to contact us directly.

    Thanks.

    #297143
    birdfamily
    Member
    Post count: 31
    This reply has been marked as private.
    #297631
    David Martin – Support
    Moderator
    Post count: 20834

    Hi Henri,

    We can help you, the file is located here: /themes/uplift/woocommerce/single-product/add-to-cart/variable.php

    You can then search in the file for this: $default = sprintf( __( 'Choose a %s', 'uplift'), $default_name ); and update to your needs.

    Thanks.

    #297638
    birdfamily
    Member
    Post count: 31

    Thank you, I’ll give it a try.

    As I understand, with this method the attribute’s name will always be the same?
    For now it’s fine, but for example if I want add a second attribute “Format” to the product, so the customer can also choose “downloadable” vs “paperback”, then both attributes will show up as “Choose a source language”?

    Thank you!
    Henri

    #298220
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    Ok yes that would be an issue, can you see if this updated code resolved the issues: https://gist.github.com/webadelic/e499f54844c58615cf2c6344d0ee1bed.

    Please install and activate the supplied child theme, inside the child theme create a folder structure like this: /woocommerce/single-product/add-to-cart.

    Inside the folder /add-to-cart/ create a new file variable.php and paste in the above code.

    – David.

    #298692
    birdfamily
    Member
    Post count: 31

    IT WORKS!

    Thank you so much and big applause!
    Henri

    #298697
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Great. Glad it’s sorted.
    Thanks David.

    -Rui

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register