• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

The code automatically lists all Shopee orders and the total amount spent

AnonyViet by AnonyViet
October 5, 2023
in Tips
0

Shopee is the largest e-commerce platform in Vietnam at the present time. People are shopping on Shopee more and more. With millions of products and attractive discounts, it’s easy to buy too much without paying attention to the total amount spent. To solve this problem, the author NT Tong shared how to automatically list all Shopee orders and the total amount spent using JS code that is quite simple and very detailed.

Join the channel Telegram belong to AnonyViet ???? Link ????

This code will access your Shopee order history, scan all orders and order details. It then aggregates the data and outputs a table containing all orders and the total amount spent.

Advantages of Shopee order statistics code:

  • Automatically list all orders without manual entry
  • Save time compared to checking each order
  • Indicates the exact total amount spent, helping to manage spending better

The code automatically lists all Shopee orders and the total amount spent

To automatically list all Shopee orders and the total amount spent, you first need to Log in to your Shopee account on the Website.

Then press the key F12 (number 1) and select enter Console tab (number 2) Paste the Code below and press Enter.

You can copy the code below or copy it from the author’s main page NT Tong: https://pastecode.io/s/7cpgip63

Code automatically lists all Shopee orders and total amount spent 5

async function getOrders(offset, limit) {
    let url = "https://shopee.vn/api/v4/order/get_all_order_and_checkout_list?limit=" + limit + "&offset=" + offset;
    var ordersData = (await (await fetch(url)).json()).data.order_data;

    var detailList = ordersData.details_list
    if (detailList) {
        return detailList;
    } else {
        return [];
    }
}
function _VietNamCurrency(number) {
    return new Intl.NumberFormat('vi-VN', { style: 'currency', currency: 'VND' }).format(number);
}
async function getAllOrders() {
    const limit = 20;
    let offset = 0;
    let allOrders = [];
    allOrders.push(
        [
            'Tên chung', 'Số lượng', 'Tổng tiền', 'Trạng thái', 'Tên shop', 'Chi tiết', 'Tiền gốc'
        ].join('\t')
    )
    let sum = 0;
    let count = 0;
    while (true) {
        let data = await getOrders(offset, limit);
        if (data.length == 0)
            break;
        for (const item of data) {
            const infoCard = item.info_card;
            const listType = item.list_type;
            let strListType;
            switch (listType) {
                case 3: strListType = "Hoàn thành"; break;
                case 4: strListType = "Đã hủy"; break;
                case 7: strListType = "Vận chuyển"; break;
                case 8: strListType = "Đang giao"; break;
                case 9: strListType = "Chờ thanh toán"; break;
                case 12: strListType = "Trả hàng"; break;
                default: strListType = "Không rõ"; break;
            }

            const productCount = infoCard.product_count;
            let subTotal = infoCard.subtotal / 1e5;
            count += productCount;
            const orderCard = infoCard.order_list_cards[0];
            const shopName = orderCard.shop_info.username + " - " + orderCard.shop_info.shop_name;
            const products = orderCard.product_info.item_groups;
            const productSumary = products.map(product => product.items.map(item => item.name + "--amount: " + item.amount + "--price: " + _VietNamCurrency(item.item_price)).join(', ')).join('; ');
            const name = products[0].items[0].name;
            if (listType != 4 && listType != 12)
                sum += subTotal;
            else
                subTotal = 0;

            const subTotalNative = _VietNamCurrency(subTotal);
            allOrders.push(
                [
                    name, productCount, subTotalNative, strListType, shopName, productSumary, subTotal
                ].join('\t')
            );

        }
        console.log('Colected: ' + offset);
        offset += limit;
    }

    allOrders.push(
        [
            'Tổng cộng: ', count, _VietNamCurrency(sum)
        ].join('\t')
    );
    var text = allOrders.join('\r\n');
    document.write('<textarea>' + text + '</textarea>');
}
getAllOrders();

After pressing Enteron the main screen side will display 1 content frame (number 3). You press Ctrl + A to highlight all content in the cell

Then open Excel, click Ctrl + V to paste the content of Shopee order statistics into the Excel file. You will then see an overview of all purchased or canceled orders, including: General name, Quantity, Total amount, Status, Shop name, Details, Principal amount. When you scroll down to the bottom of the Excel file, you will see your detailed total amount when shopping on Shopee.

Code thong ke total amount of money to buy shopee

So you can know how many orders you have purchased on Shopee in the past and the amount of money you have spent. I have more than 100 million so I can also get Gold status.

Shopee evaluates member status according to the following criteria:

  1. Silver Rank: Shoppers complete 3 orders or spend 3,000,000 VND within 6 months.
  2. Gold Rank: Shoppers complete 75 orders or spend 5,000,000 VND within 6 months.
  3. Diamond Rank: Shoppers complete 75 orders or spend 20,000,000 VND within 6 months.

To learn about the benefits of each member rank, you can see the information on this page Shopee Rewards described in great detail.

Rate this post

Tags: amountAutomaticallyCodelistsordersShopeespentTotal
Previous Post

How to automatically scale data size in Excel

Next Post

How to download videos from Google Drive links when downloading is blocked

AnonyViet

AnonyViet

Related Posts

Windows 7/8.1/10 users will be upgraded to Windows 11 for free
Tips

Windows 7/8.1/10 users will be upgraded to Windows 11 for free

July 30, 2026
Instructions for receiving ChatGPT Plus for 1 month for free in 2026
Tips

Instructions for receiving ChatGPT Plus for 1 month for free in 2026

July 28, 2026
Some reasons I don’t like Windows 11
Tips

Some reasons I don’t like Windows 11

July 27, 2026
Instructions on how to get free Facebook white ticks
Tips

Instructions on how to get free Facebook white ticks

July 27, 2026
Collection of Windows 11 wallpapers for computers and phones
Tips

Collection of Windows 11 wallpapers for computers and phones

July 26, 2026
Don’t install leaked Windows 11
Tips

Don’t install leaked Windows 11

July 25, 2026
Next Post
How to download videos from Google Drive links when downloading is blocked

How to download videos from Google Drive links when downloading is blocked

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted

Recent News

Windows 7/8.1/10 users will be upgraded to Windows 11 for free

Windows 7/8.1/10 users will be upgraded to Windows 11 for free

July 30, 2026
Instructions for receiving the free Certified LLM Security Expert certificate

Instructions for receiving the free Certified LLM Security Expert certificate

July 30, 2026
MSI laptops are not just for gamers: Which line is suitable for students, office workers and creative people?

MSI laptops are not just for gamers: Which line is suitable for students, office workers and creative people?

July 29, 2026
What is quantum resistant cryptography? Why must the Internet change?

What is quantum resistant cryptography? Why must the Internet change?

July 29, 2026
Windows 7/8.1/10 users will be upgraded to Windows 11 for free

Windows 7/8.1/10 users will be upgraded to Windows 11 for free

July 30, 2026
Instructions for receiving the free Certified LLM Security Expert certificate

Instructions for receiving the free Certified LLM Security Expert certificate

July 30, 2026
MSI laptops are not just for gamers: Which line is suitable for students, office workers and creative people?

MSI laptops are not just for gamers: Which line is suitable for students, office workers and creative people?

July 29, 2026
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

Windows 7/8.1/10 users will be upgraded to Windows 11 for free

Windows 7/8.1/10 users will be upgraded to Windows 11 for free

July 30, 2026
Instructions for receiving the free Certified LLM Security Expert certificate

Instructions for receiving the free Certified LLM Security Expert certificate

July 30, 2026
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

say88 tỷ lệ kèo nhà cái kèo nhà cái 5 febet

No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

say88 tỷ lệ kèo nhà cái kèo nhà cái 5 febet

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply