This topic has 12 replies, 3 voices, and was last updated 8 years, 2 months ago ago by Robert Hall
Hi!
I would like to translate the “shopping cart” text in the cart widget in the menu. How can I do that?
Everything else I was able to translate with PoEdit but shopping cart text in the cart widget doesn’t change.
Thanks in advance!
Hello,
Please provide us with wp-admin and FTP credentials in Private Content.
Also you can find this text in the \idstore\wp-content\themes\idstore\code\woo.php file on line 148
Regards,
Robert Hall
Thanks! I was able to change it myself 🙂 But after I update the theme do I have to do the change again?
Should the cart widget say something other than “shopping cart -“? Should there be a total sum of the cart for example?
In this case you need add the whole function into the function.php file of the Child Theme and change the ‘Shopping Cart – ‘ text like you need
function et_cart_total() {
global $woocommerce;
?>
<div class="shop-text"><span class="total"><?php _e( 'Shopping Cart - ', ETHEME_DOMAIN ); echo $woocommerce->cart->get_cart_subtotal(); ?></span></div>
<?php
}
Regards,
Robert Hall
I created a child theme and when I tried to activate it I got the following error message:
Parse error: syntax error, unexpected ‘}’ in /home/u39539/public_html/wp-content/themes/idstore-child/functions.php on line 11
style.css in the child theme folder looks like this:
/*
Theme Name: IDStore – Responsive WordPress Theme
Theme URI: https://www.8theme.com/
Author: 8theme
Author URI: http://themeforest.net/user/8theme
Template: idstore
Description: ThemeForest Premium Theme
Version: 4.1.1
Text Domain: idstore
License: GNU General Public License version 3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
And functions.php in the child theme folder looks like this:
add_action( ‘wp_enqueue_scripts’, ‘enqueue_parent_styles’ );
function enqueue_parent_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ );
}
function et_cart_total() {
global $woocommerce;
?>
<div class=”shop-text”><span class=”total”><?php _e( ‘Shopping Cart – ‘, ETHEME_DOMAIN ); echo $woocommerce->cart->get_cart_subtotal(); ?></span></div>
<?php
}
What did I do wrong?
Hello,
You forgot to add <?php
in the beginning of the file.
I’ve corrected it.
Please check now.
Best regards,
Jack Richardson.
Thanks for fixing the child theme!
The cart widget doesn’t show the total sum of the cart like it should (I have added products to the cart). Also now in the menu there seems to be some weird white square :/ Any idea how to fix these too? 🙂
I’ve added this code in style.css of the Child Theme. Please check it.
#top-cart .amount {
color: black;
}
.header-area {
background: #fafafa !important;
}
Regards,
Robert Hall
Thanks a lot!
What if I want to change the shopping cart text and the amount of the cart to white? Like you have in the demo.
I’ve changed the CSS code in the Child Theme. Please check it.
Regards,
Robert Hall
Thanks!!! 🙂
You’re welcome!
Regards,
Robert Hall
The issue related to '‘Cart widget translation’' has been successfully resolved, and the topic is now closed for further responses