Skip to content

anatoliidolia/telegram_magento

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

About

Get Information about new order in telegram

  • Start a new conversation with the BotFather( BotFather )
  • Send /newbot to create a new Telegram bot.
  • When asked, enter a name for the bot.
  • Give the Telegram bot a unique username.
  • Copy and save the Telegram bot's access token for later steps.
    • Example: 512345678:sGEiD_e124Arp0akAapbS6PFiVkMbi6dk12rc4

    How to Find a Telegram Chat ID
  • Type “@RawDataBot” and select “Telegram Bot Raw” from the drop-down list.
  • Click on the “Start” button in the auto-reply message.
  • The Telegram bot will send a message with your account info. Scroll down and find “Chat.” Your chat ID number is listed below, next to “id.’
  • How config module?
    Admin-> Stores-> Configuration-> Sales-> Checkout-> Telegram Integration
    Insert Access Token & Chat ID

    First: You need to start the recently created chat
    That's All!

    After each order you will receive a message to Telegram
    Example:

     New order from USERNAME, Product: ProductName QTY: 6 Price: 5, Product: ProductName QTY: 3 Price: 44

    All errors you can find in var/log/system.log

    main.CRITICAL: Telegram connection is wrong. Warning: file_get_contents(https://api.telegram.org/botEXAMPLE:EXAMPLE/sendMessage?chat_id=123123123&text=New+Order%3A+%D0%92%D0%BE%D0%BD%D1%8E%D1%87%D0%BA%D0%B0%2C+Items%3A++Product%3A+FFFF2222222+QTY%3A+10+Price%3A+44+Product%3A+wer+QTY%3A+10+Price%3A+5.+Price%3A+490): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
     in app/code/PeachCode/Telegram/Observer/TelegramObserver.php on line 80 [] []
    

    Enjoy!

    Magento 2.3.2 Community