add api for product type, and learn new usage of promise
Merge branch 'master' of http://github.com/lxzhu/ips