Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Send Admin HTML e-mails


blr044

Recommended Posts

Did not find any support thread for this contribution. Nor nothing in the instructions regarding support for this contribution. I am referring admin -> customers -> emails

 

Is there a way one can add customers name in the text message body, for example:

 

Hello <first_name Last_name>

 

Your order has been assigned the following UPS tracking number(s):

 

Do realize the header for the email has To: customers name.

 

After searching google, I have tried these, but nothing worked.

 

Hello <first_name>,

Hello <customer_first_name>,

Hello<CUSTOMER_FIRST_NAME>,

hELLO <%PER%FIRST_NAME>,

 

So am wondering if this is not possible? Or do I need to install mod that will let me do this?

 

Thanks in advance.

 

blr044

Link to comment
Share on other sites

  • 4 weeks later...

I wasn't able to find a thread for this contribution either...

(contribution: http://addons.oscommerce.com/info/5806)

 

I installed the contribution and I'm using the FCK HTML editor.

 

Works great - just one bug I'm trying to fix...

 

The variable EMAIL_FROM in the ADMIN>mail.php file is wrong in my application - showing up as "WWW.MYDOMAINNAME.COM" <[email protected]> which is a combination of the "from" and "from_name" variables, I think it's just supposed to be <[email protected]>.

 

Here's how the actual email header appears in the "From" field in the clients email:

 

My Domain Name > ["My Domain Name" <[email protected]]

 

Notice the misplaced ">" and duplicate name...

 

<tr>
<td class="main"><?php echo TEXT_FROM_EMAIL; ?></td>
<td>TEST<?php echo tep_draw_input_field('from', EMAIL_FROM,'size="80"'); ?></td>
</tr>

 

I used eclipse to search for the variable by name "EMAIL_FROM" through every file and line of code and it does not appear to be defined anywhere?

 

Anyone know where the variable "EMAIL_FROM" is picking up the combined values of "from" and "from_name"?

 

Regards,

Gaver

diplomacy is the art of saying "nice doggie" - while you look for a rock.

Link to comment
Share on other sites

I'm beginning to suspect there may be more wrong with my installation that previously noted.

 

When creating an email message in the admin page I see the FCKEditor window and below it a "SEND MAIL" button.

 

If I place html and body tags in the mail message by viewing the source and typing them in manually - when I click the "SEND MAIL" button , it takes me to the mail.php (same page) with the "preview" option set in the url. The page however is spread out over two or three times the anticipated height and the content of the HTML email is badly formed.

 

It's as though the "preview" is not being contained in an HTML friendly container for preview purposes and instead the HTML contained in the email message is being "mixed and mashed" into the mail.php?action=preview page.

 

At the bottom of the preview page there are three buttons... back; cancel and send mail.

 

If I select send mail - and then view the source of the email as received - the HTML and BODY tags have been stripped out of the resulting message and replaced with a paragraph tag "<p>"

 

It would appear that during the "preview" process the HTML is not being preserved or rendered correctly.

 

Is there supposed to be an HTML friendly container for the FCKEditor $message variable to be displayed into during the preview process on the mail.php?action=preview page?

 

I have done a differential comparison of the vanilla mail.php against the modified version and can not find an omission or problem that might be responsible for this anomaly.

 

Although unrelated - I'm also unable to save templates. Clicking the Disk icon acts as though I clicked the send mail button at the bottom of the window.

 

I have searched the FCKEditor.net website for terms relating to "save templates" and not had any luck determining how to capture the Disk Icon click event and route it to a different php page / script for saving a template.

 

Any help resolving these issues would be greatly appreciated...

Gaver

diplomacy is the art of saying "nice doggie" - while you look for a rock.

Link to comment
Share on other sites

Update:

 

I figured out how to prevent the HTML and BODY tags from being stripped off...

 

In the fckconfig.js - set FCKConfig.FullPage = true ;

Gaver

diplomacy is the art of saying "nice doggie" - while you look for a rock.

Link to comment
Share on other sites

Not certain if this is the recommended approach...

 

To enable the display of the HTML email message in the mail.php?action=preview page, I modifed the following code:

 

in Admin>mail.php Near Line 136:

<tr>
<td class="smallText"><b><?php echo TEXT_MESSAGE; ?></b><br>
<?php echo nl2br(htmlspecialchars(stripslashes($HTTP_POST_VARS['message']))); ?></td>
</tr>

 

Changed to this:

<tr>
<?php $message = stripslashes($HTTP_POST_VARS['message']); ?>
<td class="smallText"><b><?php echo TEXT_MESSAGE; ?></b><br>
<?php echo tep_draw_fckeditor('message','750','700',$message); ?>
</td>
</tr>

 

It appears to be working - still has all the FCKEditor buttons / icons though - which makes the whole process of "preview" somewhat redundant, especially since FCK has an excellent preview tool built in!

 

Still looking for the fix for the EMAIL_FROM problem in item #2 above if anyone has an idea on how to fix that ...

 

Regards,

Gaver

diplomacy is the art of saying "nice doggie" - while you look for a rock.

Link to comment
Share on other sites

  • 7 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...