Hi. I wanted to figure out how much I’d spent in total on meh but it turned out to be a loooooooooooooot of adding. Soooo many deals over the last few years…any chance of getting an easy way to sum it all up?
actually it doesn’t work. only adds qty 1 of everything. should be sleeping but working on a fix. it would help if I knew javascript, i’m just googling shit and trying.
var total = 0;
$('span.summary').each(function() {
var nums = $(this).text().match(/\d+\.\d+|\d+\b|\d+(?=\w)/g);
total += parseInt(nums[0],10)*parseInt(nums[1],10);
});
alert("Your Meh habit has cost you $" + total + " so far");
This does not account for shipping or VMP charges. I also don’t know what an orders page with shipping charges looks like so this may or may not work there.
@djslack I’m not sure which of ours, if either, is more efficient:
var total = 0;
$('span.summary').each(function() {
qty = $(this).text().match(/\bQuantity: \d/)[0],10;
total += parseInt($(this).text().match(/\d+$/)[0],10) * parseInt(qty.substr(-1));
});
alert("$" + total);
Was tinkering once you said you weren’t keen on Javascript. My brain is fuzzy at 3 AM though Then I saw you posted and went to see if I could trim mine any further.
Problems with my last one, too. Sometimes there are numbers in the item options. This fixes that (and brought my spend back to a somewhat sane level)
var total = 0;
$('span.summary').each(function() {
var nums = $(this).text().match(/\d+\.\d+|\d+\b|\d+(?=\w)/g);
total += parseInt(nums[0],10)*parseInt(nums[nums.length - 1],10);
});
alert("Your Meh habit has cost you $" + total + " so far");
@jbartus I think your method sidestepped the problem I had in my last version.
You are a masochist?
@Barney You mean mehsochist
@heartny Yay! Good one!!! A hundred and one purchases here…and a huge thank you to Holly for never regretting a single one!
Use the JavaScript posted in this thread:
https://meh.com/forum/topics/how-much-money-have-you-wasted-here
@narfcake Not working for me… this result is clearly not true. https://cotdropshare.s3.amazonaws.com/1CMNvkzjmY
@Collin1000
¯\_(ツ)_/¯
I think you’re going to have to blame the goat for that.
@narfcake Doesn’t work for me either, but thanks for the attempted tip.
@bluecolor TWSS
@narfcake This javascript appears to work with the current orders page:
@djslack it does indeed. @bluecolor @Collin1000 @narfcake
And this is cleaner:
actually it doesn’t work. only adds qty 1 of everything. should be sleeping but working on a fix. it would help if I knew javascript, i’m just googling shit and trying.
@jbartus @narfcake @collin1000 @bluecolor this one takes quantity into account. I spend way too much here. It nearly doubled my total!
This does not account for shipping or VMP charges. I also don’t know what an orders page with shipping charges looks like so this may or may not work there.
@djslack I’m not sure which of ours, if either, is more efficient:
Was tinkering once you said you weren’t keen on Javascript. My brain is fuzzy at 3 AM though Then I saw you posted and went to see if I could trim mine any further.
@djslack Holy cow, $3035 hahaha. Thanks.
Problems with my last one, too. Sometimes there are numbers in the item options. This fixes that (and brought my spend back to a somewhat sane level)
@jbartus I think your method sidestepped the problem I had in my last version.
@djslack does mine match your new one? Your old one definitely didn’t
Your new one did for me but I don’t know that I had the variation you saw
@jbartus They match for my orders page!
Isn’t that kind of like expecting a store to put a clock on the wall?
@RedOak
Amazon does it. Don’t look. You really don’t wanna see that. Seriously.
@f00l Really don’t want to see that total… and that would be why they bury the info.
/giphy noooooo
Just don’t make it visible to my husband, please!!!
/giphy cut up credit cards