Categories

Drupal and Taobao API

07.05.2012
Author:

Everyone knows, nowadays, about such Internet shops like eBayAmazon, etc.

But just a few are aware that they are beyond all comparison to the largest online store in China, namely taobao.  Chinese economic miracle has given a huge impetus to the rise of this internet mall, which is now far ahead of any other on-line store in the world as long as quantity of product lines and price levels are concerned (as it's Chinese, the pricing is quite low-cost). 

Taobao's only disadvantage is its interface language which is Chinese; and this makes the site navigation and item selection more complicated than it might be.Incidentally, it happens that customers would sometimes like to have their own sites set up to look just like taobao.com, with only adjustment being made for the language of interface. It should be Russian. 

To best perform this task TaoBao API will do nicely, as it's capable of pulling from TaoBao practically everything. 

So as to get hold of the nentioned API you will have to undergo the registration and then have a certain application created. Eventually, you will get the keys for using the API, which you will easily make use of on your site later. 

Next to that you'll need to download the SDK (mind that aside of PHP there are options for the kosher Java and archaic .net sites, as well).  To use it you'll require the knowledge of the API methods, which you can find

It is hardly possible to hold all taobao.com goods on a newly developed Drupal site, as there are billions of them there, nor is it easy to predict exactly what products the user is likely to be looking for. We have solved this dilemma in the following way:

  • having used the API we chose the category of goods;
  • formed links to these categories (taxonomy used);
  • once you have clicked on these links, TaoBao is sent a request which contains the ID of the appropriate category  and uses the taobao.items.search method ;
  •  from TaoBao we received product ID, its image and price (other parameters are accessabble, too, if needed), and formed the link;
  • as one has clicked on this link a query is being sent to TaoBao which is based on taobao.item.get method. The rest of the item parameters having been added and the node in Drupal with the appropriate parameters gets created.

It's more difficult than it sounds, though, for the deeper you go into the process the more problems you may face, like:

  • Taobao limitations on the number of API use instances;
  • absence of multi-language translation of goods descriptions;
  • products traffic content  leaves much to be desired;
  • the site performance leaves much to be desired;
  • Chinese as the only working language for Taobao site.

This is by no means a complete list of sticking points that happen on the way to your site's full integration with TaoBao. But I'm proud to say that all of them have been resolved, yet I have failed to learn Chinese :)

6 votes, Rating: 5

Read also

1

Not all of us know that the ...

3

CCK-formatters make up the code and are thus...

4

Popups have come so much into fashion, of late, and thus appealed to customers' sentiment that the public are starting growing more and more convinced: an ideal site has to be in popups. Whareas...

5

In the previous post I gave an example of Ctools modal API as being operated with a single form.In this one you'll be...

Subscribe to our blog updates