How To Know How Much You’ve Spent On Shopee

How To Know How Much You’ve Spent On Shopee

eCommerce platforms like Shopee has made shopping much more convenient for us, as you can order practically anything you need or want online and have it delivered straight to your doorstep. You probably asked this question yourself: how much have you spent on Shopee? How much have you saved using the eCommerce platform?

Fortunately, there’s a slick and easy way to find how much you’ve spent on Shopee since creating an account thanks to this Reddit post we stumbled upon. We tried the code ourselves, and we’re surprised at how much we’ve spent on the eCommerce platform–not to mention how much we saved. We made this quick tutorial to let you have an easy time using the code needed. Do note, however, that this how-to works best using Chrome–we have yet tried it on other web browsers.

How To Know How Much You’ve Spent On Shopee

  • Log in to your account
  • Select the Inspect option
  • Go to Console and paste code for computing total spent
  • Run code and wait for grand total

 

Log in to your account

To start things off, you’d like to log in to your Shopee account and proceed to My Purchase. Make sure you select the All tab to make the code work properly.

 

Select the Inspect option

Using Chrome, press right click on your mouse or trackpad, and select Inspect. You’ll be greeted by a window on the right side with a string of codes that you’d probably not understand. Don’t mind that, since you’ll just need to go to the Console tab.

 

Go to Console and paste code for computing total spent

Once you are in the Console tab, there’s a window where you can input a string of codes. From that box, you input the following code:

var origPriceSum = 0;
var orderPriceSum = 0;
var order = 0;
var totalTrue = 0;

String.format = function() {
var s = arguments[0];
for (var i = 0; i < arguments.length – 1; i++) { var reg = new RegExp(“\\{” + i + “\\}”, “gm”); s = s.replace(reg, arguments[i + 1]); } return s; } var formatter = new Intl.NumberFormat(‘en-US’, { style: ‘currency’, currency: ‘PHP’, // These options are needed to round to whole numbers if that’s what you want. //minimumFractionDigits: 0, // (this suffices for whole numbers, but will print 2500.10 as $2,500.1) //maximumFractionDigits: 0, // (causes 2500.99 to be printed as $2,501) }); function calculate(next){ var opts = { method: ‘GET’, headers: {} }; fetch(‘https://shopee.ph/api/v4/order/get_order_list?limit=5&list_type=3&offset=’+next, opts).then(function (response) { return response.json(); }) .then(function (body) { var next_offset = body.data.next_offset; if(next_offset >= 0){

for (let [key, val] of Object.entries(body.data.details_list)) {

var finalTotal = val.info_card.final_total / 100000;
totalTrue += finalTotal;

for (let [key2, val2] of Object.entries(val.info_card.order_list_cards)) {

for (let [key3, val3] of Object.entries(val2.items)) {

var status = val3.status;

if(status != 3){
var orderPrice = val3.order_price / 100000;
var origPrice = val3.price_before_discount / 100000;

if(Number.isNaN(origPrice)){
origPrice = orderPrice;
}

var amount = val3.amount;

var origPriceTotal = origPrice * amount;
var orderPriceTotal = orderPrice * amount;

origPriceSum += origPriceTotal;
orderPriceSum += orderPriceTotal;
}

}
}

}
calculate(next_offset);
} else {
console.log(‘Calculation completed!’);
console.log(String.format(“GRAND TOTAL: \n [OrigPrice] {0} \n [OrderPrice (Merchant Discount)] {1} \n [Savings from Merchant Discount] {2} \n [Total of OrderPrice with Other Discounts (vouchers, coins, etc)] {3} \n [Actual Total Savings] {4}”
, formatter.format(origPriceSum)
, formatter.format(orderPriceSum)
, formatter.format(origPriceSum-orderPriceSum)
, formatter.format(totalTrue)
, formatter.format(origPriceSum – totalTrue)
));
}
});
}
calculate(0);

No need to worry, as the string of codes is not malicious. What it does is it computes all of your spendings in Shopee from the time you created an account and made your first purchase.

 

Run code and wait for grand total

Once you pasted the code, just hit Enter on your keyboard and the code will compute how much you’ve spent on Shopee since creating an account. This just takes less than a minute, and the code will be done once you get a “Calculation completed!” line. From there, you have the numbers of 1) Total spent, 2) Discount from the merchant, 3) Savings from Merchant discount, 4) Total of orders with the discounts, and 5) Actual total savings.

From the five figures you’ve come across, Total Price reflects how much you’ve spent on Shopee without the discounts and vouchers. The actual total amount spent is the second to the last figure, as this includes all the discounts and vouchers that you used.

 

And that’s a simple way to check how much you’ve spent on Shopee. Gaano kalala yun budol sa ‘yo ng Shopee? Let us know in the comments section!

This post is search optimized by the #1 SEO Services Company in the Philippines – SEO Hacker

1 Comment

  • Jinbei , September 12, 2023

    Not working. Still works in 2023?

Leave a Reply

Your email address will not be published. Required fields are marked *

Latest News

Latest Reviews

Best Phones in the Philippines

Best Guides

Recent Posts