[Resolved] Display cart panel on add to cart

Home Forums Support [Resolved] Display cart panel on add to cart

Home Forums Support Display cart panel on add to cart

Viewing 15 posts - 1 through 15 (of 27 total)
  • Author
    Posts
  • #909389
    Emmi

    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?

    #909395
    Emmi

    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?

    #909397
    Emmi

    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.

    #909401
    David
    Staff
    Customer Support

    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.

    #909402
    Emmi

    🙂 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.

    #909411
    David
    Staff
    Customer Support

    Yeah the customizer does some ‘odd’ things – it should and does only display on the single product on the front end.

    #909413
    Emmi

    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.

    #909417
    David
    Staff
    Customer Support

    Tom is currently looking into this. Which translation plugin are you using?

    #909419
    Emmi

    I am not using any translation plugin.
    It is the first time I need to translate anything on WooCommerce.

    #909429
    David
    Staff
    Customer Support

    Thats odd – if you don’t mind i will pass this to Tom as i know he is looking into a similar issue.

    #909437
    Emmi

    Sure, no problem.
    Thanks, David!

    PS: Please let me know…is it odd not to use any translation plugin? 🙂

    #909453
    David
    Staff
    Customer Support

    thanks – i was just being stupid and assumed a translation plugin was being used lol

    #909790
    Tom
    Lead Developer
    Lead Developer

    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;
    } );
    #910244
    Emmi

    Hi, Tom.

    My default language is romanian. It is not in this list…
    How can it be added?

    #910591
    Tom
    Lead Developer
    Lead Developer

    I’ve just added it. You can sign up to become a translator here: https://translate.generatepress.com/become-a-translator/

    Thank you! 🙂

Viewing 15 posts - 1 through 15 (of 27 total)
  • You must be logged in to reply to this topic.