-
AuthorPosts
-
October 28, 2015 at 9:31 am #643204
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.
October 28, 2015 at 9:45 am #643225This reply has been marked as private.October 28, 2015 at 11:54 am #643411Hi 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.
October 29, 2015 at 8:22 am #644672Hi 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
October 29, 2015 at 11:23 am #644928Hi 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!
October 30, 2015 at 11:24 am #646471sorry my mistake, i added the code in the wrong section.
It works just fine.
Thanks!
October 30, 2015 at 2:28 pm #646685We’re delighted to assist you with this.
-
AuthorPosts