| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
How to add SMS notification | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Dear friends,
Please help me with tips on how to add Short Messaging Service notifications to my X-Cart store.
__________________
change is constant X-cart 4.1.8 Drop Shipping webfront |
|||||||
#2
|
|||||||
|
|||||||
![]() Hello Instinct,
I needed this capability as well, so I figured out how to code it in X-Cart 4.0.19. Consider it another gift back to the wonderful X-Cart forums community. Description: This code will allow you to send a SMS text message to a Cellphone when the order is received. This is a great way for your site owner or admin to keep tabs on incoming sales even when they are away from the office. Short Messaging Service (SMS) typically allows 150 to 160 characters maximum per message. You will need a cellphone and a subscription from your cellphone provider to receive text messages. Rates vary among providers. Some charge by message, other by kilobyte and others offer unlimited messaging plans. NOTE: There are 2 versions of the (Step 1) code below... SMS initial order notifications, or SMS processed order notifications. It's always advisable to backup any files you will be modifying. Version 1: SMS Initial Order Notifications to Orders Department (i.e. Admin). Advantage: You can turn the SMS messages on and off via the initial orders notifications setting in the Admin --> General Settings --> Email Notifications Options STEP 1: Locate file: include/func.php (for 4.0.x)... for 4.1.x, make the MODs to file: include/func/func.order.php (note that the line numbers will be different, but code is the same) Locate Code (Line 3206): Code:
Replace with this Code (2 lines added): Code:
Version 2 (Optional): If you would prefer SMS cellphone alerts only for Processed orders and not Initial orders, then use this code instead of the code above, and you will get an SMS alert in addition to your normal Email Notification: Locate Code (Line 3463): Code:
Code:
Create New File (in skin1/mail folder): order_notification_sms_subj.tpl File Contents: Code:
STEP 3 (SMS email body line): Create New File (in skin1/mail/html folder): order_notification_sms.tpl File Contents: Code:
The above message body code shows the Order Number, Customer Name, Customer Phone, Customer State, Each Product SKU (Quantity), and Order Total Amount ($). Comment out those you do not wish displayed, or add other variables you would like to see. Just remember you only have about 150-160 characters per SMS alert message. Please let me know if you find this useful. I haven't tested it in the newest version of X-Cart, but once you find the matching old code, then inserting the new SMS code should be a snap. Tested on X-Cart 4.0.19 Robert P.S. Maybe one of the site moderators can move this to the Completed MODs section.
__________________
X-cart 4.1.10 |
|||||||
|
#3
|
|||||||
|
|||||||
![]() [quote
Code:
[/quote] Hi Robert Thanks for your codes. Two questions 1)what do you mean by $sms_email = "10digitCellNumber@cingularme.com";? 2)Also when a customer places order,is it possible to send SMS to each of the registered customer's ordered product? Can you help me? Thank you. |
|||||||
#4
|
|||||||
|
|||||||
![]() Quote:
In regards to your question 1, just enter your Cell Phone Number and Wireless Carrier's SMS address. For example: If you use T-Mobile... $sms_email = "1234567890@tmomail.net"; (note: of course, you would type in your personal 10-digit phone number) HERE IS A LIST OF SOME POPULAR SMS EMAIL ADDRESS FORMATS: Alltel: phonenumber@message.alltel.com AT&T Wireless: (now Cingular): phonenumber@mmode.com Boost Mobile: phonenumber@myboostmobile.com Cingular: phonenumber@cingularme.com Metro PCS: phonenumber@mymetropcs.com Nextel: phonenumber@messaging.nextel.com Ntelos: phonenumber@pcs.ntelos.net Orange: phonenumber@orange.net Sprint (now Sprint Nextel): phonenumber@messaging.sprintpcs.com T-Mobile: phonenumber@tmomail.net US Cellular: 10digit number@email.uscc.net Verizon: phonenumber@vtext.com Virgin Mobile: phonenumber@vmobl.com --- In regards to your question 2, if you would also like the SMS message to go to the customer... I have not tried that yet, but here is an idea: First add some code to collect the customer's SMS address during checkout (i.e. cell phone number with carrier's sms domain). Assign this to the variable $customer_sms_email; Next, look in include/func/func.order.php and find the line were the Order Processed Email is sent to the customer: Code:
Then, just add the same SMS code to that section, as shown in my Version 2 in Post #2 above, but modified for $customer_sms_email Code:
As I said, I have not tried that version yet, so just do some testing on a test site until you getting working the way you want with some test orders. Robert
__________________
X-cart 4.1.10 |
|||||||
#5
|
|||||||
|
|||||||
![]() Quote:
Thanks Robert for your quick response.I want your help to send sms notification that goes to customer's only.Can you help me ? Thank you. |
|||||||
#6
|
|||||||
|
|||||||
![]() do you need some type of SMS gateway for this?
__________________
4.1.10 |
|||||||
#7
|
|||||||
|
|||||||
![]() yes.
|
|||||||
#8
|
|||||||
|
|||||||
![]() Hello Learner,
To send an SMS Notification message to the customer, you will need to know the customer's SMS Email Address. Since there are numerous wireless companies, you would either need to collect that address from them, or their Cell Phone Number, and use a service or software product that can look-up that number and find the carrier and their SMS address domain. Optionally, use one of the SMS Gateway services to send a SMS to the customer's email address. If you collect the SMS address during Checkout, just test and use the code that I supplied above. Otherwise, you will need to look into using a SMS Gateway service or piece of custom software, such as: Kannel: Open Source WAP and SMS gateway: http://www.kannel.org/ Upside Wireless: Developer APIs... Uses SOAP to send SMS messages directly from your web site... http://www.upsidewireless.com/api.htm VisualTron: VisualGSM Mobile Application Server... SQL database driven SMS Gateway / WAP Push Gateway: http://www.visualtron.com/products.htm View their online Demo to Send an SMS via Email using their email2sms plugin: http://www.visualtron.com/online_demo2.htm SMS Tutorial: What is an SMS Gateway? http://www.developershome.com/sms/sms_tutorial.asp?page=smsGateway Robert
__________________
X-cart 4.1.10 |
|||||||
#9
|
|||||||
|
|||||||
![]() I'm trying to set this up in 4.3.2 and I'm not having any luck. Is there something that's different?
I've tried both SMS email addresses and other normal email address. As far as the SMS gateway, you don't need one in order to email SMS email addresses. I do it all the time at work and we don't have one.
__________________
X-Cart 4.3 Joomla Among other things ![]() |
|||||||
#10
|
|||||||
|
|||||||
![]() For those that are interested, I figured this out for 4.3.2
http://forum.x-cart.com/showthread.php?p=336406
__________________
X-Cart 4.3 Joomla Among other things ![]() |
|||||||
|
|||
X-Cart forums © 2001-2020
|