• 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

Instructions on how to format text on the Windows 11 notepad
Tips

Instructions on how to format text on the Windows 11 notepad

August 16, 2025
4 ways to fix bluetooth connectivity on Windows 11
Tips

4 ways to fix bluetooth connectivity on Windows 11

August 8, 2025
How to know the computer is tracked and processed by Keylogger
Tips

How to know the computer is tracked and processed by Keylogger

August 7, 2025
Opal: Create applications who do not need to write code
Tips

Opal: Create applications who do not need to write code

August 3, 2025
How to activate a new Start menu on Windows 11
Tips

How to activate a new Start menu on Windows 11

July 29, 2025
Intellgpt: AI tool for osint and data science
Tips

Intellgpt: AI tool for osint and data science

July 28, 2025
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
Inline Feedbacks
View all comments

Recent News

Instructions on how to format text on the Windows 11 notepad

Instructions on how to format text on the Windows 11 notepad

August 16, 2025
Instructions for receiving 80GB of free data from VinaPhone from August 15

Instructions for receiving 80GB of free data from VinaPhone from August 15

August 15, 2025
Online driving exam preparation: Support theory and practice

Online driving exam preparation: Support theory and practice

August 15, 2025
How to add application to your favorite bar

How to add application to your favorite bar

August 14, 2025
Instructions on how to format text on the Windows 11 notepad

Instructions on how to format text on the Windows 11 notepad

August 16, 2025
Instructions for receiving 80GB of free data from VinaPhone from August 15

Instructions for receiving 80GB of free data from VinaPhone from August 15

August 15, 2025
Online driving exam preparation: Support theory and practice

Online driving exam preparation: Support theory and practice

August 15, 2025
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

Instructions on how to format text on the Windows 11 notepad

Instructions on how to format text on the Windows 11 notepad

August 16, 2025
Instructions for receiving 80GB of free data from VinaPhone from August 15

Instructions for receiving 80GB of free data from VinaPhone from August 15

August 15, 2025
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí mm88 8XBET mm88 trang chủ new88

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

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí mm88 8XBET mm88 trang chủ new88

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