How much have you spent on HobbyKing.com?

by tomsun | November 14, 2013 | (6) Posted in Tips

For some odd reason more than half of my RC parts comes from HobbyKing. Depressing or not; that means their purchase history page has some useful information:

- How much money have they got from me over the years? is an obvious question.
They almost provide the answer, by presenting a list of all orders with the order totals displayed. But there is no grand total and when you have 10:s of orders over multiple pages, it starts getting tedious to summarize them manually.

- More than once I've found myself clicking through all orders, to look up which exact part I bought several years ago. Really useful that the data is there with links to the product pages and all, but the part where you click back and forth is really frustrating. Some way to export all the data into a giant text file would be neat, importable into a spreadsheet maybe...

The last few hours I sat down and hacked together some javascript to automate the first task. The latter one is left for another day (or as an exercise for the reader perhaps ;-) )


Here is how you can figure out what you've spent on HobbyKing.com yourself, in 6 simple steps:

1. Start Mozilla Firefox
(Google Chrome supposedly have limited Greasemonkey support too, I haven't verified that) 


2. Install the Greasemonkey extension
...by clicking the "Add to Firefox" button

This is a tool that lets you augment your favorite sites with small snippets of JavaScript code that you yourself - not the site owner - has control over. It can be neat way to work around situations when the brains behind some website doesn't want to implement a small feature that you need, that would be easy to do but doesn't fit their vision or schedule. A drawback is that such scripts can be quite fragile: if the site owner changes their code they might step all over your scripts's assumptions. I.e. if you rely on this kind of hacks, be prepared that many of them will break / need additional tweaking over time. A library of Greasemonkey scripts can be found at userscripts.org

 

 

3. Install my Greasemonkey script hobbyking.purchased.user.js

The easiest way is to click "install" in the top right corner on its page on userscripts.org.

Alternatively, get it straight from my GitHub repository and drop it into Firefox manually.

 

4. Head over to HobbyKing.com and log in.

 

5. Click over to the order history page

There is a link on the customer page ("Orders: xx CHECK") and another in the footer ("Order Status").

 

6. "Total amount: calculate" above the list, is the new functionality we just added.

Click "calculate" and wait a few seconds while the script goes through all pages.

If that text doesn't show up then verify via  "Tools" > "Add-ons" > "User Scripts" that you performed steps 2 and 3 correctly. (If some time has passed since this article was written, that could alternatively be a symptom of that HobbyKing has changed that page in an unfortunate way since I last tested the script)

 

7. Voilá!

  

 

8. If you don't want to use the script anymore, it is easily removable via "Tools" > "Add-ons" in Firefox's menu bar. Click the "User Scripts" tab to the left and you get the option to disable or remove our script "hobbyking.purchased". The Greasemonkey plugin itself can be managed via the "Extensions" tab next to it.

 

No promises on future expansion or maintenance, but feel free to send feedback, fork it and / or submit pull requests over on GitHub.

COMMENTS

ghostrider03z on November 18, 2013
that says you spent a million dollars at hk...
Log In to reply
tomsun on November 18, 2013
faked it for the screenshot ;) not quite that bad in reality, but have still spent way too much...
Log In to reply
tramsgar on November 18, 2013
If I didn't know already, I wouldn't want to know =). But perhaps a much needed wakeup call for many? Thanks.
Log In to reply
PabloJaime on November 19, 2013
The page to get the scripts it's not working and your page in Github gives and permit error.. :(
Log In to reply
tomsun on November 19, 2013
You're right, 502 Bad Gateway on userscripts.org right now...

GitHub should work, here is a direct link to the file: https://raw.github.com/tomsun/purchased.js/master/hobbyking.puchased.user.js
Log In to reply
PabloJaime on November 20, 2013
With the new link go it!!
Thanks!!!
Log In to reply
PabloJaime on November 20, 2013
Ohh!! well, now I have the script installed, checked in Tools>bla bla... but it shows me 0$...
This is what shows in the page:
Total amount: USD $0
2 pages parsed (make sure this matches what you see below)
0 orders found (make sure this matches what you see on the customer page)
Report generated using purchased.js by tomsun
Log In to reply
tomsun on November 19, 2013
userscripts.org seems to be back in business now
Log In to reply
Willsonman on November 21, 2013
I think for me the issue was I had a couple cancelled orders. Using the trusty calculator I'm up to $634.67
Log In to reply
andre on November 21, 2013
It is a love hate thing with HK. Cheap parts coupled with horrible customer service. I know what I've spent ;) addictive hobby.
Log In to reply
tomsun on November 21, 2013
Version 1.0.1 uploaded, which excludes cancelled orders and provides more graceful fallback when it fails to determine the number of order pages (which it fails to do in some cases)
Log In to reply
PabloJaime on November 21, 2013
Updated, still not working for me :(
Log In to reply
jweymarn on November 22, 2013
1.0.1 works for me! Sad numbers :-)

I have some unpaid and a cancelled order and it seems thats why version 1.0 didnt work.
Log In to reply
mmerry2 on November 21, 2013
Nice idea. Would love it if HobbyKing let you download your order history and items to a spreadsheet or CSV file. There has been several times where I had to painfully search back through my order history to find something I ordered previously to re-order it or refer it to someone else.
Log In to reply
Cyberdactyl on November 21, 2013
Oh God. . . I don't want to know how much I've spent at HK !

And I now try to avoid HK at any opportunity. They charge an way too much for shipping. The delivery time is much too long, and they are frequently out of stock on popular items.

I now MUCH prefer sites like RcTimer or Dealextreme or Bangood, etc. Basically sites that provide the vast amount of their items with free shipping AND the delivery times are 20-60% of that of HK.
Log In to reply

You need to log-in to comment on articles.


How much have you spent on HobbyKing.com?