New Landing How can we help? Themeforest Theme Support Neighborhood Shopping bag button text

Viewing 15 posts - 1 through 15 (of 16 total)
  • #144007
    fixers
    Member
    Post count: 253

    Hi,

    Im keen to change the text – site wide in woo commerce from shopping bag, to suitcase?

    on all add to shopping cart bags etc etc.

    Ive tried localisation and other translation plug ins with no joy as advised previously – there must be an easier way to do this? Can anyone please advise?

    Theres a lot of people asking about this in the forums and seem to all get stuck – perhaps a tutorial on this would be helpful?

    #144076
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please paste this code at functions.php of child theme.

    function sf_text_strings( $translated_text, $text, $domain ) {
    $translated_text = strtolower($translated);
    switch ( $translated_text ) {
    case 'shopping bag' :
    $translated_text = __( 'Suitcase', 'woocommerce' );
    break;
    }
    return $translated_text;
    }
    add_filter( 'gettext', 'sf_text_strings', 20, 3 );
    

    Thanks
    Mohammad

    #144104
    fixers
    Member
    Post count: 253

    Hi Mohammad

    Hmm that didn’t work – seemed to send my site haywire?

    #144154
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please try again this code:-

    <?php
    
    function sf_text_strings( $translated_text, $text, $domain ) {
    $translated_text = strtolower($translated);
    switch ( $translated_text ) {
    case 'shopping bag' :
    $translated_text = __( 'Suitcase', 'woocommerce' );
    break;
    }
    return $translated_text;
    }
    add_filter( 'gettext', 'sf_text_strings', 20, 3 );
    
    ?>
    

    Thanks
    Mohammad

    #144286
    fixers
    Member
    Post count: 253

    Nope, still sends my site haywire?

    #144670
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    My colleague Mr Laranz will assist you shortly. He is expert in translation.
    Thanks
    Mohammad

    #157987
    fixers
    Member
    Post count: 253

    No on replied to this?

    #158011
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please install codestyling plugin and translate the shopping bag string as you desire. You can also do through .PO and .MO language files.
    Thanks
    Mohammad

    #158391
    fixers
    Member
    Post count: 253

    Hi Mohammad, Please scroll up this thread and see my previous responses. The code localisation doesn’t find the button text?

    #158445
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please upgrade to latest version of theme all plugins.
    Thanks
    Mohammad

    #158588
    fixers
    Member
    Post count: 253

    All up to date? Do you read the comments above, going round in circles.

    #158956
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Which comments should i read? Any specific page url? Have you tried the translations through .PO and .MO language files.
    Thanks
    Mohammad

    #159193
    fixers
    Member
    Post count: 253
    This reply has been marked as private.
    #159226
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I have made changes but your website redirected to http://localhost:8888/home/. So i am unable to view the website.
    Thanks
    Mohammad

    #159364
    fixers
    Member
    Post count: 253

    Thats done the job, can you let me know what you did to make the change?

Viewing 15 posts - 1 through 15 (of 16 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