This is a discussion on nabaztag order notification within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; If you have a Nabaztag, you can now take advantage of the open API and osCommerce to send yourself an ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| If you have a Nabaztag, you can now take advantage of the open API and osCommerce to send yourself an order announcement so the bunny will tell you when a new order has arrived. You'll have to enable the API at http://my.nabaztag.com/vl/action/myTools.do in order to allow this to work. The announcement message can be customized to fit your needs, but will also work perfectly "out of the box". To install, all you need to do is place the following code after the 'SEND_EXTRA_ORDER_EMAILS_TO' if statement and before the '$payment_modules->after_process();' lines. Here is the code... /* nabaztag order announcement system */ $nabSN = 'XXXXXXXXXXXX'; //replace with your nabaztag's serial number $nabTK = 'XXXXXXXXXX'; //replace with your assigned API tolken number $nabMsg = ''; $nabProdList = ''; $nabLeftEar = '1'; //modify your ear position, 1 to 16 $nabRightEar = '1'; //modify your ear position, 1 to 16 // begin announcement $nabMsg .= 'You have a new order. Order number ' . $insert_id . ' has arrived. '; // customer's name $nabMsg .= $order->customer['firstname'] . ' ' . $order->customer['lastname']; // customer's city $nabMsg .= ' from ' . $order->customer['city'] . ' '; // product list for ($nabI=0, $nabN=sizeof($order->products); $nabI1) $nabProdList .= 'and '; $nabProdList .= $order->products[$nabI]['qty'] . ' ' . $order->products[$nabI]['name']; if ($nabI!=$nabN-1) $nabProdList .= ', '; } $nabMsg .= ' has ordered ' . $nabProdList . '.'; $nabAnnounce = file_get_contents('http://api.nabaztag.com/vl/FR/api.jsp?sn=' . $nabSN . '&token=' . $nabTK . '&posright=' . $nabLeftEar . '&posleft=' . $nabRightEar . '&tts=' . urlencode($nabMsg), "r"); /* end nabaztag order announcement system */ More...
__________________ Michael Sasek osCMax Developer
|
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Order notification sent to fax? | Brinked | osCommerce 2.2 Modification Help | 0 | 08-24-2005 11:37 PM |
| New Customer Notification Mod | lem | osCMax v1.7 General Mods Discussion | 0 | 05-16-2005 11:10 PM |
| Notification | kellycog | osCMax v1.7 Discussion | 3 | 07-28-2004 11:31 AM |
| Turning notification off? | mshaffer | osCMax v1.7 Discussion | 1 | 02-16-2004 02:49 PM |
| Order notification for Seller - possible?? | stando | osCMax v1.7 Discussion | 4 | 01-18-2004 02:33 PM |