def get_price id
      response = open("http://a.m.tmall.com/ajax/sku.do?item_id=#{id}").read

      begin
        good_json =JSON.parse response
        price_info = good_json['availSKUs'].first.last

        return {:price => price_info['price'].to_s,
          :promo_price =>price_info['promoPrice'].to_s}
      rescue JSON::ParserError
        'get.price.error'
      end  

      false
    end
def get_price id
      response = open("http://a.m.tmall.com/ajax/sku.do?item_id=#{id}").read

      begin
        good_json =JSON.parse response
        price_info = good_json['availSKUs'].first.last

        return {:price => price_info['price'].to_s,
          :promo_price =>price_info['promoPrice'].to_s}
      rescue JSON::ParserError
        'get.price.error'
      end  

      false
    end
可获取促销价