Support » Plugin: WP eCommerce » Change cart to basket

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi Jules,

    Have you try doing a text search and replace the word ‘Cart’ to ‘Basket’?

    Thank you,
    Ray

    Thread Starter julesjunction

    (@julesjunction)

    Hi Ray,

    would I have to do the replace in the language file, the php files or both?

    I updated wp-e-commerce/wpsc-languages/EN_en.php but didn’t see any change on the front end.

    Kind regards,
    Jules

    Ray & Jules,

    You could do this pretty easily by creating a little function that lives in the theme functions.php, or a php file in mu-plugins, that uses the filter that feeds the text translation functions.

    This is the WordPress documentation for how to get it done, including examples.

    http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext

    Jeff

    …and yes, another option is to create a new translation file with the word basket instead of cart, but that seems like a little more work than we would want to do for a single word.

    Thread Starter julesjunction

    (@julesjunction)

    Jeff,

    that looks interesting. I will see if I can figure that out and give it a go.

    Thanks,
    Jules

    Jules

    Were you able to write a successful function for WP E-commerce to change the text site wide? Would you be willing to post here? Thank you

    Thread Starter julesjunction

    (@julesjunction)

    likemindsdesigns…sorry, it’s on my list of things to do, just haven’t got there yet 🙁

    I added this to my functions.php file and it seems to be working:

    //Function to change Cart to Basket
    add_filter('gettext', 'translate_text');
        add_filter('ngettext', 'translate_text');
    
        function translate_text($translated) {
        $translated = str_ireplace('Cart', 'Basket', $translated);
        return $translated;
        }
    Thread Starter julesjunction

    (@julesjunction)

    Well that was very easy, it appears to be working!

    Thank you likemindsdesigns for your solution. I appreciate you replying with your update.

    Thanks
    Jules

    I have just set up a WordPress account to leave this message – hands down the best bit of advice regarding this issue. As a UK retailer this has been causing me some stress, I have looked across numerous forums and this is the most quick, easiest and 100% effective way to change the Americanised ‘cart’ to ‘basket’. No Loco plugin needed or anything!

    Cheers for this likemindsdesigns it is seriously greatly appreciated mate!

    regards

    Dan

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Change cart to basket’ is closed to new replies.