定制 peachcode/telegram-magento 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

peachcode/telegram-magento

Composer 安装命令:

composer require peachcode/telegram-magento

包简介

Magento & Telegram

README 文档

README

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-> Telegram-> Admin Notification-> Telegram Integration
    Insert Access Token & Chat ID

    Feature

    Customize Telegram Messages from the Admin Panel

    You can modify the Telegram message text directly from the Magento admin panel.

    For example, the default template looks like this: Customer Name: {customer_name}, Product {name}, QTY: {quantity}, Price: {price}, Final Price: {final_price}

    This template can be customized to fit your needs by using the available variables:

    {customer_name} — the name of the customer {name} — the product name {quantity} — the product quantity {price} — the product price {final_price} — the total order amount Here’s how it looks in the interface:

    Example: If you set the following template: New order from {customer_name}. Items: {name} - QTY: {quantity}, Price: {price}. Total: {final_price}

    You will receive a message in Telegram like this: New order from John Doe. Items: Laptop - QTY: 2, Price: 1500. Total: 3000

    Simple and flexible!

    img.png

    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.4.7 Community

    统计信息

    • 总下载量: 5
    • 月度下载量: 0
    • 日度下载量: 0
    • 收藏数: 7
    • 点击次数: 1
    • 依赖项目数: 0
    • 推荐数: 0

    GitHub 信息

    • Stars: 7
    • Watchers: 1
    • Forks: 3
    • 开发语言: PHP

    其他信息

    • 授权协议: proprietary
    • 更新时间: 2023-02-18

    承接程序开发

    PHP开发

    VUE

    Vue开发

    前端开发

    小程序开发

    公众号开发

    系统定制

    数据库设计

    云部署

    网站建设

    安全加固