Forums / All Other Contributions/Addons / Make a sale, get a text message

Make a sale, get a text message

Views: 59,723

Results 121 to 136 of 136
7 Dec 2010, 11:32 AM
#121
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,718
Plugin Contributions:
56

Make a sale, get a text message

You're right - these instructions are outdated. The email archive change was circa 1.3.7, and the CAN_SPAN was added in 1.3.8. I will update the documentation shortly.

Scott

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

7 Dec 2010, 11:53 AM
#122
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,718
Plugin Contributions:
56

Re: Make a sale, get a text message

Please download the new copy of the mod and follow those instructions (the old step 4 was deleted), then see the faq on my home page where detailed instructions are given for this change.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

7 Dec 2010, 2:06 PM
#123
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Make a sale, get a text message

swguy:

Please download the new copy of the mod and follow those instructions (the old step 4 was deleted), then see the faq on my home page where detailed instructions are given for this change.

Thanks Scott

downloaded v1.1a and compared to my installs.

file class.msg_owner.php looks like this :

<?php class msg_owner extends base { // Set your mobile number here var $owner_phone = "MY_NUMBER@MY_PROVIDER.COM"; function msg_owner() { global $zco_notifier; $zco_notifier->attach($this, array('NOTIFY_CHECKOUT_PROCESS_AFTER_SEND_ORDER_EMAIL')); } function messages_desired() { if ( defined('SMS_SEND_MESSAGE') && (SMS_SEND_MESSAGE == 'false') ) { return false; } return true; } function update(&$callingClass, $eventID) { if (!$this->messages_desired()) return; global $order; $email_text = $order->customer['firstname'] . " " . $order->customer['lastname'] . "\n" . round($order->info['total'], 2) . "\n"; $empty_block = array('NOTHING' => 'NADA'); zen_mail('Shop Owner', $this->owner_phone, 'Chillout Fashions Order', $email_text, STORE_NAME, EMAIL_FROM, $empty_block, "msg_owner",''); } } ?>

and line 109 in includes/functions/functions_email.php looks like this (and has been coded this way for many weeks):

if (($module != 'xml_record') || ($module !== 'msg_owner')) {

So, in essence, I have been working with your latest version for weeks but for some (irrelevant) modifications like rounding of the order value and the actual message text wording, yet I am still getting the CAN-SPAM blah blah attached to the SMS.

It is the same story with any of my installed payment modules.

Am I missing something?

I feel that the solution is somewhere in a modification of the file includes/functions/functions_email.php

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

7 Dec 2010, 2:26 PM
#124
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,718
Plugin Contributions:
56

Re: Make a sale, get a text message

You have:

($module !== 'msg_owner')) {

Please change to:

($module != 'msg_owner')) {

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

7 Dec 2010, 9:13 PM
#125
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Make a sale, get a text message

swguy:

You have:

($module !== 'msg_owner')) {

Please change to:

($module != 'msg_owner')) {

That's what I had initially and it wouldn't do the trick, hence changed it to !==

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

8 Dec 2010, 1:13 PM
#126
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Make a sale, get a text message

Changed back to

($module != 'msg_owner')) {

still same result: no go. CAN-SPAM etc still shows up in the SMS :shocking:

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

8 Dec 2010, 5:07 PM
#127
cycochuck avatar

cycochuck

New Zenner

Join Date:
Jan 2010
Posts:
42
Plugin Contributions:
0

Re: Make a sale, get a text message

frank18:

Changed back to

still same result: no go. CAN-SPAM etc still shows up in the SMS :shocking:

You can try my files and see if they work for you. I did add to the sql file and changed class.msg_owner.php so that I can set the text address and turn on and off logging from the admin.

9 Dec 2010, 9:55 AM
#128
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Make a sale, get a text message

cycochuck:

You can try my files and see if they work for you. I did add to the sql file and changed class.msg_owner.php so that I can set the text address and turn on and off logging from the admin.

Thanks cycochuck. I'll have a play with this on the weekend.

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

11 Dec 2010, 3:10 AM
#129
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Make a sale, get a text message

frank18:

Thanks cycochuck. I'll have a play with this on the weekend.

Installed your version, love the ability to change address and logging in admin, BUT the CAN-SPAM garbage still appears in the SMS. Although this does not affect the operation of the store, it absolutely cheeses me off that I can't fix this issue :frusty:

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

5 Jan 2011, 4:32 AM
#130
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Make a sale, get a text message

Fixed the suppression of the CAN-SPAM garbage in the SMS message body in the file includes/functions/functions_email.php

around line 108 replaced

      if ($module != 'xml_record') {
        if (!strstr($email_text, sprintf(EMAIL_DISCLAIMER, STORE_OWNER_EMAIL_ADDRESS)) && $to_email_address != STORE_OWNER_EMAIL_ADDRESS && !defined('EMAIL_DISCLAIMER_NEW_CUSTOMER')) $email_text .= "\n" . sprintf(EMAIL_DISCLAIMER, STORE_OWNER_EMAIL_ADDRESS);
        if (defined('EMAIL_SPAM_DISCLAIMER') && EMAIL_SPAM_DISCLAIMER != '' && !strstr($email_text, EMAIL_SPAM_DISCLAIMER) && $to_email_address != STORE_OWNER_EMAIL_ADDRESS) $email_text .= "\n" . EMAIL_SPAM_DISCLAIMER;
      }

with this

      // this suppresses the email disclaimer and CAN-SPAM in SMS on sale message
      if ($module == 'msg_owner') {
         define('EMAIL_DISCLAIMER', ''); 
         define('EMAIL_SPAM_DISCLAIMER', '');
      } 
      // EOF suppression of the email disclaimer and CAN-SPAM in SMS on sale message
      else {
      if ($module != 'xml_record') {
        if (!strstr($email_text, sprintf(EMAIL_DISCLAIMER, STORE_OWNER_EMAIL_ADDRESS)) && $to_email_address != STORE_OWNER_EMAIL_ADDRESS && !defined('EMAIL_DISCLAIMER_NEW_CUSTOMER')) $email_text .= "\n" . sprintf(EMAIL_DISCLAIMER, STORE_OWNER_EMAIL_ADDRESS);
        if (defined('EMAIL_SPAM_DISCLAIMER') && EMAIL_SPAM_DISCLAIMER != '' && !strstr($email_text, EMAIL_SPAM_DISCLAIMER) && $to_email_address != STORE_OWNER_EMAIL_ADDRESS) $email_text .= "\n" . EMAIL_SPAM_DISCLAIMER;
        }
      }

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

25 Mar 2011, 1:53 PM
#131
charlesconway23 avatar

charlesconway23

New Zenner

Join Date:
Mar 2011
Posts:
1
Plugin Contributions:
0

Re: Make a sale, get a text message

Hi! The same thing is being used in sms marketing.

25 Mar 2011, 2:33 PM
#132
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,718
Plugin Contributions:
56

Re: Make a sale, get a text message

Just remember that when you say "SMS Marketing" your customers think "Mobile Spam." Tread VERY carefully in this area; here be dragons.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

23 Jan 2012, 11:59 AM
#133
coopco avatar

coopco

New Zenner

Join Date:
Jun 2006
Location:
Sea Lake, Australia
Posts:
81
Plugin Contributions:
0

Re: Make a sale, get a text message

frank18, that did not work for me, any other suggestion?

24 Jun 2012, 3:48 PM
#134
evilwalks avatar

evilwalks

New Zenner

Join Date:
Jun 2012
Posts:
10
Plugin Contributions:
0

Re: Make a sale, get a text message

Scott,
Thank you for your wonderful mod!

If I'd like it to send me, say:

customer name
customer country
products orderd (this is the most importnad part)
amount: $100

How would I set that up?

I've already figured out the country part, but still no luck with products ordered. My sms service provider can handle more than 140 symbols.

Any help is really appreciated.

24 Jun 2012, 8:45 PM
#135
evilwalks avatar

evilwalks

New Zenner

Join Date:
Jun 2012
Posts:
10
Plugin Contributions:
0

Re: Make a sale, get a text message

Hi everyone,
I figured it out by myself. Here's the code in case someone's searching for similar functionality:

$email_text = $order->customer['firstname'] . " " .  $order->customer['lastname'] . "\n" . "|" . $order->customer['country']['title'] . "\n" . "|" . "\n" . "Subtotal: \$" . $order->info['subtotal'] . "\n" . "|" . "\n" . "Shipping: \$" . $order->info['shipping_cost'] . "\n" . "|" . "\n" . "Total: \$" . $order->info['total'] . "\n" . "|" . "\n" . $order->products_ordered . "\n";

You will recieve and SMS message in the following format:
Customer name | Country name | Subtotal | Shipping cost | Total | Products ordered

where "|" is a separator. It's just looking good on my cellphone screen.

Initially I wanted subtotal, shipping and total to be displayed at the end of the message, but it didn't work - I'm probably missing something at the end of this statement ```php
$order->products_ordered . "\n";


Cheers.
10 Jan 2013, 11:23 PM
#136
sensualpalace avatar

sensualpalace

New Zenner

Join Date:
Jul 2012
Posts:
16
Plugin Contributions:
0

Re: Make a sale, get a text message

I have the mod working and the format looks good on my phone with no SPAM message on the bottom. Why would I receive two exact same text messages for every new order? Any ideas?

Cyndee
Sensual Palace
Like me on Facebook!