Telegram Bot - China to Ukraine Delivery
The idea is to order goods from the Chinese platform Poizon to Ukraine online.
This Chinese platform works only within China. But delivery directly from China was carried out by logistics in Ukraine with a certain price. This telegram bot takes into account the shipping price according to the formula, and the shipping price depends on the weight of the product. This Telegram bot has currency exchange from Ukrainian hryvnia to Chinese yuan. There are also contacts.
Using statuses relative to the user's chat id. Each user has his own object with an order, from currency exchange, so that no error occurs. Using comments for payment, which are generated automatically and sent to both the administrator and the user to pay for the parcel. The formula for calculating logistics depending on the value and weight of the parcel. Currency calculator. Contacts. Use of asynchronous functions, function callbacks. Possibility of ordering to another country. Filling in information via switch case. If the user sends text instead of a number, or a picture instead of text, then an error occurs that prevents the order from continuing until the user enters the correct data. Of course, instead of sending the order data to the admin, you can use the database, or record each user in the database, his chat ID, first name, last name, and later make advertising mailings using the database. Eating a database with a telegram bot is very useful for future mailings, but it is not so important in this particular project
#Javascript/jQuery/Ajax #node.js #sqlite #sqlite3 #bots
This Chinese platform works only within China. But delivery directly from China was carried out by logistics in Ukraine with a certain price. This telegram bot takes into account the shipping price according to the formula, and the shipping price depends on the weight of the product. This Telegram bot has currency exchange from Ukrainian hryvnia to Chinese yuan. There are also contacts.
Using statuses relative to the user's chat id. Each user has his own object with an order, from currency exchange, so that no error occurs. Using comments for payment, which are generated automatically and sent to both the administrator and the user to pay for the parcel. The formula for calculating logistics depending on the value and weight of the parcel. Currency calculator. Contacts. Use of asynchronous functions, function callbacks. Possibility of ordering to another country. Filling in information via switch case. If the user sends text instead of a number, or a picture instead of text, then an error occurs that prevents the order from continuing until the user enters the correct data. Of course, instead of sending the order data to the admin, you can use the database, or record each user in the database, his chat ID, first name, last name, and later make advertising mailings using the database. Eating a database with a telegram bot is very useful for future mailings, but it is not so important in this particular project
#Javascript/jQuery/Ajax #node.js #sqlite #sqlite3 #bots