New Landing How can we help? Themeforest Theme Support Neighborhood How to actually change "Bag" to "Cart" and keep it.

Viewing 15 posts - 1 through 15 (of 23 total)
  • #132233
    Sean
    Member
    Post count: 116

    I know this has been asked before, and even I have asked this before.

    Many of us want to change “Bag” to “Cart” across the entire website. Is there a way to do this one time so that it is never overwritten with a theme update? In the past, editing it through a child theme did not actually make changes to the words. You had to do it through the main theme.

    Please help, thanks!

    #132363
    laranz – SUPPORT
    Member
    Post count: 3186

    Hi,

    Did you try to change those words via translation? By translating the .po file.?

    Let us know,

    Thanks,
    laranz.

    #132637
    Sean
    Member
    Post count: 116

    This is overwritten whenever the theme is updated. I’m looking for a permanent solution.

    #132900
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    That’s the only solution. The language file can be setup in the child theme.

    Can you try the code adding the code below to your child theme functions.php

    Also you will need to create a “language” folder inside your child theme and paste the .po and .mo files there.

    /**
     * Setup My Child Theme's textdomain.
     *
     * Declare textdomain for this child theme.
     * Translations can be filed in the /language/ directory.
     */
    function my_child_theme_setup() {
        load_child_theme_textdomain( 'swiftframework', get_stylesheet_directory() . '/language' );
    }
    add_action( 'after_setup_theme', 'my_child_theme_setup' );

    -Rui

    #222365
    Sean
    Member
    Post count: 116

    Can you give me some more information on this? I add this code, then copy over the .po and .mo files into that new folder?

    #222368
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    That’s it exactly. Give it a try.

    -Rui

    #222369
    Sean
    Member
    Post count: 116

    I need to make the changes to the .po and .mo files right? Can I use a text editor?

    #222411
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Its very easy. Please use this plugin https://wordpress.org/plugins/real-time-find-and-replace. It will Bag to Cart easily without any problem.
    Thanks
    Mohammad

    #222668
    Sean
    Member
    Post count: 116

    The only problem is that replaces the classes that use “cart” in it and break some of the styling. Is there a way for it to not change classes?

    #222685
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Do you want to change only Shopping Bag to Shopping Cart? Do you see Bag text beside it?
    Thanks
    Mohammad

    #222843
    Sean
    Member
    Post count: 116

    I see what you mean. So I can just put in more specific instances. Thanks.

    #222844
    Sean
    Member
    Post count: 116

    The text in the actual Shopping Cart dropdown are not changing. Any ideas?
    http://springrates.com/

    #222862
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please provide me login detail to inspect and resolve the issue.
    Thanks
    Mohammad

    #222864
    Sean
    Member
    Post count: 116
    This reply has been marked as private.
    #222877
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please provide me FTP login detail because i see your site down.
    Thanks
    Mohammad

Viewing 15 posts - 1 through 15 (of 23 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register