86

Update (April 3, 2011): WP E-Commerce 3.8 is out and it looks like it works fine with WPML. Test it and let us know how it’s going.

A week ago we wrote about sponsoring support for niche development and now we’re getting ready start with the first multilingual e-commerce solution for WordPress.

Three folks – Nicolas Harnois (2 Associés), Dan Milward (WordPress e-Commerce Plugin) and Level Level have agreed to sponsor this work.

Since we have an interested co-sponsor, we’ll naturally be starting with WordPress e-Commerce.

What’s a multilingual e-commerce solution?

An e-commerce plugin is like a CMS inside a CMS. It has its own database with products, shopping carts and transactions. Going multilingual means that products need to have language attributes and be translatable.

Then, the entire shopping, checkout and delivery process needs to run in the language in which the product was viewed.

Of course, people would also need to be able to pay in different currencies. That’s not exactly language related, but still should be supported.

How

WPML includes a mechanism for hooking to other plugins.  We call it compatibility packages.

The idea is that the e-commerce plugin continues working the same in one language. When WPML also runs, it will use hooks and filters in the e-commerce plugin to add the language information. This is exactly what WPML does with WordPress core as well.

On the e-commerce plugin side, we’ll need to make sure that there are filters in place for adding the language attributes. For instance, WPML needs to add language selectors to product pages, and translation controls to product administration.

Once all these filters and hooks are in place, WPML can make any plugin fully multilingual, just for the users who need it. Makes sense?

When

We got word that WP e-Commerce is updating now. We’ll work together with the folks from Instinct to make this new release multilingual-ready. We’re very excited about this and can’t wait to get started!

If you’re running an e-commerce WordPress site and want to see it running multilingual, let us know. We’ll be looking for early adopters to test and give feedback.

86 Responses to “Multilingual e-Commerce with WordPress”

    • Actually, yes.

      Dan, from WPEC told me that they’re going to release WPEC 3.8 in a matter of days. Then, we’ll be able to add our stuff there and finally have a working solution.

  1. I’m going to create an ecom site, probably using both your multilingual plugin + WP E-Commerce.

    I’d love to test anything easier! 😉

    But the matter is pretty urgent.

    Thanks,
    Zelda

  2. We are building now our multilingual online shop with wp e-commerce 3.8 and wpml. We are happy to hear that you are working on this possibility and would be glad to be early adopters and testers. Thanks.

    • Thanks. WPEC is getting there but it’s taking its time. We need to wait for their progress in order to make it multilingual-ready. I’ll post when there are news.

  3. I am working on a site now that is in Czech and English and I would love to be able to use an e commerce solution in Czech and English. I would be happy to be an early tester. Any idea when you would be ready for testing?

  4. Hi i have been trying using WPML with WPEC but no success….The products-page in the translated language finds no products but when i click on a translated category the products are there.

    Robin….I saw that your multilingual WPEC works marvelous.could you tell what have you done in order to make it working???

    I am sorry but i dont have my site online yet, i am working on localhost.

    Thanks a lot.

  5. I am using wpml 2.3.2 with wp-ecommerce 3.8.4 but I cannot activate WPML Media, WPML String Translation and WPML Sticky Links. The admin plugin page just gives a white screen. Anyone has a suggestion?

  6. Hey all,

    WPML is working pretty darn well with WP-Commerce, thanks loads for this!
    I just have one small issue which is bugging me and I can’t figure out how to append the /en/ to the URL when paginating.

    Can anyone shed any light?
    You can see the problem here:

    http://www.missmonkee.com/preview/kochtail/en/products-page/baking/

    Try to paginate to the page 2, you will see the URL changes to remove the /en/ from the URL. This is whats causing the error.

    If you check it in german, the pagination works fine as the URL is not appending the /en/ anymore.

    Any help would be much appreciated!
    Cheers Mel

  7. Hello,

    I’ve got the same problem with the problem with the product permalinks and have written a little script without touching the core of the plugins. Just paste this in the functions.php in your theme or create a plugin which runs the code


    function wpsc_wpml_get_element_language( $element_id , $element_type = 'post' ){
    global $wpdb;
    $translation_element = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'icl_translations WHERE element_id = ' . $element_id . ' AND element_type="' . $element_type . '"');
    return $translation_element->language_code;
    }
    function wpsc_wpml_workaround( $permalink, $post_id ){
    $wp_url = get_bloginfo( 'wpurl' );

    $icl_settings = get_option('icl_sitepress_settings');
    $default_language = $icl_settings['default_language'];

    $sub_url = substr( $permalink, strlen( $wp_url ), strlen( $permalink) );
    $post = get_post( $post_id, 'OBJECT' );

    $element_language = wpsc_wpml_get_element_language( $post_id, 'post_wpsc-product' );
    if( $default_language != $element_language ) $permalink = $wp_url . '/'. $element_language . $sub_url;

    return $permalink;
    }
    add_filter( 'wpsc_product_permalink', 'wpsc_wpml_workaround', 1, 2 );

    I hope it will help you! 😉

    • I’m not sure about PayPal. This is something that’s supposed to be part of WPEC. WPML will set the correct locale and WPEC should send to the right PayPal URL.

      It’s not supposed to work as you describe. It doesn’t matter to which PayPal URL we send. The PayPal locale is controlled via the ‘lc’ argument.

  8. I’ll try to write THEM … I wrote to you because I readed that you was making a join venture for translation.

    Are you sure this action button definitely not bypassable by another plugin ?

  9. Hi!,

    I would like to buy the pugins, But I need something that changes the currencies as well as the languages. Is this still a beta project, or it is possible to start?

    Thank you!
    Maria

    • WPML doesn’t automatically convert the amounts between the product in different languages. Right now, the idea is to let you have the flexibility of entering the amounts you specify in different currencies. I understand that when you have thousands of products it’s a lot of work.