osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

nabaztag order notification

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


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > New osCommerce Contributions

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 01-29-2007, 02:12 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,992
Thanks: 80
Thanked 345 Times in 324 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Post nabaztag order notification

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


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 08:49 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax