CMS MADE SIMPLE FORGE

Orders

 

[#5593] User Email Template problem

avatar
Created By: Silver Tom (silvertom)
Date Submitted: Sat Oct 30 09:44:44 -0400 2010

Assigned To:
Version: 1.10.5
CMSMS Version: None
Severity: Major
Resolution: Accepted
State: Closed
Summary:
User Email Template problem
Detailed Description:
The default user email template is, the cms_siteprefs table =>
Orders_mapi_pref_useremail_template. If I modify it, or reset the factory
defaults, the new template moved the cms_module_templates => module_name =
orders and template_name = useremail_template. But
$this->GetPreference('useremail_template' is search it in the cms_siteprefs, and
the CmsMailer says it error => empty body.


History

Comments
avatar
Date: 2010-11-04 23:17
Posted By: Prue Rowland (psy)

Problem due to 2 incorrect method calls in class.orders_gateway_helper.php

*Admin Email*

Change line 326 from:
$body =
$orders_mod->ProcessTemplateFromData($orders_mod->GetPreference('adminemail_template'));

to:
$body =
$orders_mod->ProcessTemplateFromData($orders_mod->GetTemplate('adminemail_template'));

*User Email*

Change line 341 from:
$body =
$orders_mod->ProcessTemplateFromData($orders_mod->GetPreference('useremail_template'));

to:

$body =
$orders_mod->ProcessTemplateFromData($orders_mod->GetTemplate('useremail_template'));

hth
psy

      
avatar
Date: 2010-11-04 23:34
Posted By: Prue Rowland (psy)

one more...

Change line 48 from:
    if( !is_object($order_obj) ) return 'error_orderinvalid';

to:

    if( !is_object($order_obj) ) return $orders_mod->Lang('error_orderinvalid');
      
avatar
Date: 2010-12-02 11:06
Posted By: Robert Slotboom (robbedoes)

Added these changes but without result.
      
avatar
Date: 2010-12-02 12:02
Posted By: Robert Slotboom (robbedoes)

This error seems to occur in orders/action.invoice.php on or near line 148;

//$body =
$this->ProcessTemplateFromData($this->GetPreference('useremail_template'));

Replacement
$body =
$this->ProcessTemplateFromData($this->GetTemplate('useremail_template'));
      
avatar
Date: 2010-12-03 06:01
Posted By: Michael Weiland (LightFighter)

Thank you, thank you, thank you!!! It's works!
      
avatar
Date: 2011-01-21 03:13
Posted By: marek a. (maranc)

And once things in action.invoice.php - on line 158 change:

$body =
$this->ProcessTemplateFromData($this->GetPreference('adminemail_template'));

to

$body =
$this->ProcessTemplateFromData($this->GetTemplate('adminemail_template'));

This is for sending email to admin.

Marek A.
      
avatar
Date: 2011-02-21 16:25
Posted By: Robert Campbell (calguy1000)

These weren't ALL of the changes necessary for a going forward solution....
(which is why we tend to not like code changes in the forum).

I will address this for the next release.
      
Updates

Updated: 2012-04-18 04:26
cmsms_version_id: => -1
state: Open => Closed

Updated: 2011-02-21 16:25
resolution_id: => 6