- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2019
12:49 AM
08-30-2019
12:49 AM
How to Send Mag::Log error using Whatsapp, is it Possible?
How can i send my EventObserver log message by whatsapp message?
Labels:
5 REPLIES 5
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2020
07:34 PM
07-24-2020
07:34 PM
Re: How to Send Mag::Log error using Whatsapp, is it Possible?
@curtnorvalf534 As per technology everything possible the way of try may be different but everything possible, we did it, using Twilio API.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2020
07:44 PM
07-24-2020
07:44 PM
Re: How to Send Mag::Log error using Whatsapp, is it Possible?
I do not know that. I am very interested in this, can you share more about?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2020
12:16 AM
07-25-2020
12:16 AM
Re: How to Send Mag::Log error using Whatsapp, is it Possible?
@curtnorvalf534 Whenever log generated pass to WhatsApp using Twilio, go to Twilio document you will get some idea.
My observer:
<?php ini_set("memory_limit", "-1"); require_once '/home/website/public_html/website_whatsapp_notification/vendor/autoload.php'; use Twilio\Rest\Client; class Gta_MatchProductOrder_Model_Observer { public function checkproductinorder($Observer) { $sid = "hrgrugrgrbggbeibgurbgrgbreu"; $token = "dngfngrgngnrtngngregrngreug"; $twilio = new Client($sid, $token); $order = $Observer->getEvent()->getOrder(); $items = $order->getAllItems(); $skus = array('6250109', '6926238', '6250108'); //product SKUs $skuList = array(); foreach ($items as $item) { if(in_array($item->getSku(), $skus)) { $orderid = $Observer->getEvent()->getOrder()->getIncrementId(); $skuList[] = $item->getSku(); } } // Mage::log('The order Id ' . $orderid . ' contains amazon list SKU : '.implode(',',$skuList), null, 'matchorder.log'); $messagesss = $twilio->messages ->create("whatsapp:+01236459877", // to array( "from" => "whatsapp:+02158745225", "body" => 'The order Id ' . $orderid . ' contains amazon list SKU : '.implode(',',$skuList) ) ); ### start test observer ### // $order = $Observer->getEvent(); // Mage::log($order->getName(),null,'orderproduct.log'); ### end test observer ### } }
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2021
11:10 PM
01-22-2021
11:10 PM
Re: How to Send Mag::Log error using Whatsapp, is it Possible?
.....
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2021
10:56 PM