• Hi,

    I´m configuring a new product:

    https://testshop.golfball-uhu.de/produkt/lignum-safebag-golf-personalisierbar/

    and I´m using the “option select field” which creates the “select option” dropdown. This “select option” is getting translated by the general options field “Label for “Select options” button” + within the language files.

    But it is not getting translated on my site + the error message as well “Please, select an option” . Any idea what´s going wrong?

    Best Regards

    René

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi there,

    I hope you’re well. To change the Select an option label in the select add-ons, you will need to add the following PHP code in the functions.php of your current theme:

    if ( ! function_exists( 'yith_wapo_custom_select_option_label' ) ) {
    function yith_wapo_custom_select_option_label( $label ) {
    return 'Your custom label';
    }
    add_filter( 'yith_wapo_select_option_label', 'yith_wapo_custom_select_option_label', 10, 1 );
    }

    We’ll remain at your disposal.

    Thread Starter golfball-uhu

    (@golfball-uhu)

    Hi,

    thx for the fix…but I don´t understand why I need a fix in the functions.php? The term “select option” is getting translated by the language file + general settings of your plugin!?

    And the fix does not fix the error message “Please, select an option”….after not selecting the option and add to cart (it´s mandatory).

    REgards

    Thread Starter golfball-uhu

    (@golfball-uhu)

    Hi,

    I´m still waiting for the fix of error message.

    Regards

    Hi there,

    In that case, you could try the following PHP code instead, which will let you modify the messages of when the add-ons settings are validated in the product page:

    if ( ! function_exists( 'yith_wapo_custom_change_error_messages' ) ) {
    add_filter( 'yith_wapo_frontend_localize_args', 'yith_wapo_custom_change_error_messages', 10, 1 );

    function yith_wapo_custom_change_error_messages( $args ) {
    if ( isset( $args['i18n']['selectAnOption'] ) ) {
    $args['i18n']['selectAnOption'] = 'Please, select an option';
    }
    if ( isset( $args['messages']['checkMinMaxErrorMessage'] ) ) {
    $args['messages']['checkMinMaxErrorMessage'] = 'Please, select an option';
    }
    return $args;
    }
    }

    Let us know if this helped you.

    Thread Starter golfball-uhu

    (@golfball-uhu)

    Perfect…thx 🙂

    Thread Starter golfball-uhu

    (@golfball-uhu)

    Hi,

    there´s another translation problem within the plugin.

    Regarding “Total Price Box”: Show product price and total options” is NOT getting translated by language files or backend settings. Means:

    Product Price: xy

    Total options: xy

    Order Total: xy

    No translation possible!?

    Best Regards

    René

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.