Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #643204

    joybram
    Participant

    Hi There,

    I’m trying to adjust the checkout billing field and cart page. I’m using woocommerce poor guys swiss knife for adding some additional fields and woocommerce NL for translation. But some items are just not changing. Update cart in cart page and the sentence:
    Note: Shipping and taxes are estimated and will be updated during checkout based on your billing and shipping information. I’d rather delete this item, but i cannot find it anywhere.

    Also on the checkout page. The additional info field i would like to delete. Unfortunately this is not possible with wpgsk.

    And the last thing i would like to change is agree to terms, placing it above te order button on the checkout, instead of beneath.

    I already tried loco and poedit for the translations but somehow there is no sourcecode?

    Thanks in advance.

    #643225

    joybram
    Participant
    This reply has been marked as private.
    #643411

    Thai
    Moderator

    Hi There,

    Thanks for writing in!

    In order to translate those strings, you can simply use following code in your child theme’s functions.php file:

    add_filter('gettext', 'x_translate_text' , 20, 3);
    function x_translate_text ( $translated_text, $text, $domain ) {
    $translation = array (
    'Note: Shipping and taxes are estimated%s and will be updated during checkout based on your billing and shipping information.' => 'Your new NL language',
    'Update Cart' => 'Your new NL language'
    );
    if( isset( $translation[$text] ) ) {
    return $translation[$text];
    }
    return $translated_text;
    }

    Also on the checkout page. The additional info field i would like to delete. Unfortunately this is not possible with wpgsk.

    And the last thing i would like to change is agree to terms, placing it above te order button on the checkout, instead of beneath.

    Try adding following CSS under Customize > Custom > CSS:

    .woocommerce-checkout .woocommerce-shipping-fields {
        display: none;
    }
    .woocommerce-checkout .entry-wrap {
        padding-bottom: 100px;
    }
    .woocommerce-checkout .checkout .form-row.terms {
        margin-top: -30px;
    }
    .woocommerce-checkout input#place_order {
        margin-bottom: -115px;
    }

    Hope it helps.

    #644672

    joybram
    Participant

    Hi there

    Thanks for the CSS it worked excellent. accept terms & conditions is replaced.

    The translations though is a different story.

    I tried to translate several items on the cart page. They stay the same. I also tried deactivating loco trans and got rid of the woocommerce nl plugin. Everything stays the same.

    Is there another way i can translate it?

    Thanks in advance

    #644928

    Zeshan
    Member

    Hi Joy,

    Thanks for writing in!

    You need to translate those strings in X language file x.pot located in folder /wp-content/themes/x/framework/lang/. For more detail, please review our KB article on Translation. You can use Poedit to translate X language file.

    Thank you!

    #646471

    joybram
    Participant

    sorry my mistake, i added the code in the wrong section.

    It works just fine.

    Thanks!

    #646685

    Prasant Rai
    Moderator

    We’re delighted to assist you with this.