Archived topic
Display cart panel on add to cart
26 replies · Started by Emmi on May 24, 2019
Hello,
How can I translate the message displayed when adding item to cart, with the "Display cart panel on add to cart" option checked?
But wait... I just discovered that in the backend live customizer, the cart panel looks different and displays the message in sites language.
Only in frontend the panel message is in english.
Did I do something, or is it a bug?
Oh, now I see...
There are 2 different things:
"Display cart panel on add to cart" and a "Success Message" on adding item to cart.
So I just need to configure the text for the sticky add to cart panel I suppose.
Am I right?
Lol.
And just unchecked the “Display cart panel on add to cart” option, in order to see into action only the “Success Message” on adding item to cart.
But the message is not displayed in frontend, only in customizer.
There is where my confusion came: in customizer, the sticky cart panel on add to cart is not diplayed, only the succes message is.
Pfooa... Let me know how can I send some Admin credentials to you, so you can duplicate what I am saying.
Hi there,
just looking at your site, and currently the Success Message is being displayed. And it looks like it is in the correct language. Note: the Success Message only displays on the Single Product.
Let me know.
:) In my customizer, the success message is displayed in the shop page.
I can't confirm it for the single product page, because the add to cart button seems to be deactivated.
Yeah the customizer does some 'odd' things - it should and does only display on the single product on the front end.
Yeap. Confusing :)
Now, how can I translate / change the text for the sticky panel when adding item to cart?
You can see it displays in english, not default language.
Tom is currently looking into this. Which translation plugin are you using?
I am not using any translation plugin.
It is the first time I need to translate anything on WooCommerce.
Thats odd - if you don't mind i will pass this to Tom as i know he is looking into a similar issue.
Sure, no problem.
Thanks, David!
PS: Please let me know...is it odd not to use any translation plugin? :)
thanks - i was just being stupid and assumed a translation plugin was being used lol
You'll likely need to translate that string in your language here: https://translate.generatepress.com/glotpress/projects/gp-premium
Otherwise, you can use a filter to change the text:
add_filter( 'gettext', function( $translated_text ) {
if ( 'Item added to cart.' === $translated_text ) {
$translated_text = 'Your new text here';
}
return $translated_text;
} );
Hi, Tom.
My default language is romanian. It is not in this list...
How can it be added?
I've just added it. You can sign up to become a translator here: https://translate.generatepress.com/become-a-translator/
Thank you! :)