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
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.
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.
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):
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.if (($module != 'xml_record') || ($module !== 'msg_owner')) {
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
Last edited by frank18; 7 Dec 2010 at 03:10 PM.
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.
Changed back to
still same result: no go. CAN-SPAM etc still shows up in the SMS($module != 'msg_owner')) {![]()
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
with thisCode: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; }
Code:// 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; } }