Button proceed to checkout, view, etc

Sencillo
12 Posts
Sencillo posted this 06 December 2015

Hi, I read you will fix the problem with the translation of the "proceed to checkout" - and "view" - buttons. When will this be done? It´s really a problem if you have a full "German" website and shop with "English" buttons.
Please fix this problem as soon as possible.
Thanks

Hi, I read you will fix the problem with the translation of the "proceed to checkout" - and "view" - buttons. When will this be done? It´s really a problem if you have a full "German" website and shop with "English" buttons. Please fix this problem as soon as possible. Thanks
Vote to pay developers attention to this features or issue.
10 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 09 December 2015

Hello,
please refer to
https://answers.themler.com/questions/8574/woocommerce-proceed-to-checkout-button/8587#post-8587

You may also try to follow solutions provided by other WP users https://wordpress.org/support/topic/change-proceed-to-checkout-button

Regards,
Aileen

Hello, please refer to https://answers.themler.com/questions/8574/woocommerce-proceed-to-checkout-button/8587#post-8587 You may also try to follow solutions provided by other WP users https://wordpress.org/support/topic/change-proceed-to-checkout-button Regards, Aileen
Sencillo
12 Posts
Sencillo posted this 09 December 2015

Hi,
this is the same answer you gave another user, but that´s not the solution for this problem.
Themler-Theme use the text 'Proceed to Checkout →' and wordpress don´t accept this, so I have to change the code every time to 'Proceed to Checkout' in the theme-code style.css ! Maybe you can change this in the default themes for WP and woocommerce by the next updates?
By the way, where can I find the code for the text in buttons "view" and "Proceed to Checkout" in the "cart-link" to change them too, because there is also no translation available?
Thanks

Hi, this is the same answer you gave another user, but that´s not the solution for this problem. Themler-Theme use the text 'Proceed to Checkout →' and wordpress don´t accept this, so I have to change the code every time to 'Proceed to Checkout' in the theme-code style.css ! Maybe you can change this in the default themes for WP and woocommerce by the next updates? By the way, where can I find the code for the text in buttons "view" and "Proceed to Checkout" in the "cart-link" to change them too, because there is also no translation available? Thanks
anneke
104 Posts
anneke posted this 09 December 2015

@sencillo

Unfortunately Themler still won't have a solution for the problem...

When you want to translate some things, you can find it in the cart.php etc files :) But! When you update the theme, it's gone and you need to translate it again.

So Themler and woocommerce isn't a great combination till Themler will do some good updates.

@sencillo Unfortunately Themler still won't have a solution for the problem... When you want to translate some things, you can find it in the cart.php etc files :) But! When you update the theme, it's gone and you need to translate it again. So Themler and woocommerce isn't a great combination till Themler will do some good updates.
Stagger Lee
1840 Posts
Stagger Lee posted this 09 December 2015

add_filter(  'gettext',  'wps_translate_words_array'  );
add_filter(  'ngettext',  'wps_translate_words_array'  );
function wps_translate_words_array( $translated ) {
     $words = array(
                        // 'word to translate' = > 'translation'
                        'Proceed to Checkout →' => 'Some Words',
                        'View' => 'Some Others',
                    );
     $translated = str_ireplace(  array_keys($words),  $words,  $translated );
     return $translated;
}

add_filter( 'gettext', 'wps_translate_words_array' ); add_filter( 'ngettext', 'wps_translate_words_array' ); function wps_translate_words_array( $translated ) { $words = array( // 'word to translate' = > 'translation' 'Proceed to Checkout →' => 'Some Words', 'View' => 'Some Others', ); $translated = str_ireplace( array_keys($words), $words, $translated ); return $translated; }
Stagger Lee
1840 Posts
Stagger Lee posted this 09 December 2015

You can add new lines and translate everything else needed.

You can add new lines and translate everything else needed.
Sencillo
12 Posts
Sencillo posted this 09 December 2015

Thanks, but where have I to write this code ? ... "my theme"/woocommerce/cart/cart.php ?
which line is the best ?

Thanks, but where have I to write this code ? ... "my theme"/woocommerce/cart/cart.php ? which line is the best ?
Stagger Lee
1840 Posts
Stagger Lee posted this 09 December 2015

Settings - CMS Code. It wont translate in cart widget.

Settings - CMS Code. It wont translate in cart widget.
Sencillo
12 Posts
Sencillo posted this 09 December 2015

Thanks so much !!!

Thanks so much !!!
Stagger Lee
1840 Posts
Stagger Lee posted this 09 December 2015

You can make cart widget works like this:

  • Insert one new row control under "Total", above 2 buttons.
  • In first columns insert CMS Code control with code number 1:
  • In second column CMS Code control with code number 2:
  • They will give you original WooCommerce translating.
  • Delete old two buttons.
  • Style new buttons in Themler.

Code number 1:

<?php global $woocommerce; ?>
<a href="<?php echo theme_woocommerce_enabled() ? $woocommerce->cart->get_cart_url() : ''; ?>" class=" bd-button"><?php _e('View', 'woocommerce'); ?></a>

Code number 2:

<?php global $woocommerce; ?>
<a href="<?php echo $woocommerce->cart->get_checkout_url(); ?>" class=" bd-button"><?php _e('Proceed to Checkout', 'woocommerce'); ?></a>

You can make cart widget works like this: - Insert one new row control under "Total", above 2 buttons. - In first columns insert CMS Code control with code number 1: - In second column CMS Code control with code number 2: - They will give you original WooCommerce translating. - Delete old two buttons. - Style new buttons in Themler. Code number 1: &lt;?php global $woocommerce; ?&gt; &lt;a href="&lt;?php echo theme_woocommerce_enabled() ? $woocommerce-&gt;cart-&gt;get_cart_url() : ''; ?&gt;" class=" bd-button"&gt;&lt;?php _e('View', 'woocommerce'); ?&gt;&lt;/a&gt; Code number 2: &lt;?php global $woocommerce; ?&gt; &lt;a href="&lt;?php echo $woocommerce-&gt;cart-&gt;get_checkout_url(); ?&gt;" class=" bd-button"&gt;&lt;?php _e('Proceed to Checkout', 'woocommerce'); ?&gt;&lt;/a&gt;

Last edited 09 December 2015 by Stagger Lee

Sencillo
12 Posts
Sencillo posted this 09 December 2015

Thanks again :-)

Thanks again :-)
You must log in or register to leave comments