Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Mail Manager


npn2531

Recommended Posts

genata33, the placeholders occur only in the mail manager files. See mail manager/admin/mm_responsemail.php The placeholders are referenced from that file, but are stored in the database in the table mm_response mail within the field htmlcontent and the record 'order confirmation'.

_

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

Hi npn2531 and thanks for your rapid response .

I made your great contribution and all work perfect. I use 2 langauge french and english and how can i - when i send a message to a friend in french and the email receive be in french and for english in english.

 

For this from admin, html text

 

in english

 

 

Hello $toname,

Your friend, $fromname thought that you would be interested in $product from $storename.

 

To view the product click on the link below or copy and paste the link into your web browser:

 

$link

 

Regards, $storename

 

-----------------------------------------------------------------

$fromname says:

 

$message

 

and in for french and english

 

...........................

 

...........................

 

I tried put in administration html code this:

 

Hello $toname,

 

<?php echo TEXT_FR_1 ?>, $fromname <?php echo TEXT_FR_2 ?> $product <?php echo TEXT_FR_3 ?> $storename.

 

<?php echo TEXT_FR_4 ?>

 

$link

 

<?php echo TEXT_FR_5 ?>, $storename

 

-----------------------------------------------------------------

$fromname <?php echo TEXT_FR_6 ?>:

 

$message

 

 

AND then define this in include/languages/french/tell a friend.php.. and english also

 

define('TEXT_FR1', '......');

define('TEXT_FR2', '......');

 

....... BUT nothing.

 

I tried define also in mm_responsemail.php but nothing and i d,ont understend very well the placeholders... :wacko:,

 

I tried put in /httpdocs/includes/modules/mail_manager/tell_a_friend.php

 

to

 

//build email

 

$output_content_html = $header['htmlheader'].$mail_manager_status['htmlcontent'].$header['htmlfooter'].' ' .TEXT_FR1.'......... ' ;

but when i send a message en french .D'ont work.

 

How i can made this pls? You can help me pls. Indeed a great work this mail manager.

 

Thanks a lot sir and i hope you help me.

Edited by cata44
Link to comment
Share on other sites

I made your great contribution and all work perfect. I use 2 langauge french and english and how can i - when i send a message to a friend in french and the email receive be in french and for english in english.

 

It would take considerable rewriting of mail manager to do this. One simple solution, not the most elegant, would be to enter the email in both English and French, one directly above the other in the admin when you create the letter.

 

Placeholders: To understand placeholders you could start by learning about the php command: str_replace

An excellent tutorial can be found here: www dot tizag dot com/phpT/php-string-str_replace.php

 

This command is incorporated in the mail manager programming in the file admin/mm_bulkmail about line 260, see comment //placeholders

Edited by npn2531

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

Hello npn2531,

sorry it is again me but I just can't seem to be finding where the problem is. I am not sure that you understood the problem right(maybe because I didn't explain it well).

 

Now as I am looking my orders I see that when a client order 1 item everything is OK but if the client ordered 2 or more products in the invoice is shown only the first product. The order total is right though(it gives the sum of the all ordered products not just the product shown). When I look in the database table orders_products there is only one record for the order. Can you please point me where the problem might be because it is really inconvinient not to be able to see what my clients order?

Thank you in advance and once again sorry to bother you again...

genata93

Link to comment
Share on other sites

  • 5 weeks later...

Hello,

 

any chance to have this great contrib working with Order Editor contribution? (http://addons.oscommerce.com/info/1435/v,22). I'm sure that most of oscommerce admins use this contrib in order to edit some customer orders from admin ...

Order editor have the option of "Send new order confirmation e-mail" but the order is sent in plain text ...

Also, I have another question: is there any possibility for the admin to receive the order in html format also? I see that customer receive the order in html but I receive it in plain text (I have set an e-mail address in My Store at Send Extra Order Emails to ...). Is it normal to be like this?

Link to comment
Share on other sites

Also, working with Recover Cart Sale would be nice ... there is an option for an automated e-mail sent to customer who let tehir product in cart for some reason....

 

Very nice contrib!!!

Link to comment
Share on other sites

Hello,

 

can anyone help me with the image size from tell_a_friend.php module? I don't know how to make the image smaller in the e-mail as my image is 500x500px and it displayes at his size in email ... :)

 

I think this is the code (below) but I don't know how to change attributes ... I tried to change with fixed size but it doesn't work.

 

$product_image = tep_image($image_urlfix.DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], '', '', '');
$product_name = $product_info['products_name'];

 

Thank you in advance!

PS:

npn2531 are you still there? :) This contribution is wonderful but I would like to use it also for order editor and I need some advice of how can I integrate it with it ...

Edited by cristiwww
Link to comment
Share on other sites

You can change the image size in the admin, but this changes it for everything. To change it only for tell_a_friend.php go to catalog/includes/modules/mail_manager/tell_a_friend.php and change

 

$product_image = tep_image(HTTP_SERVER.'/'.DIR_WS_IMAGES . $product_info['products_image_xl'], $product_info['products_name'], '', '', '');

 

to

 

$product_image = tep_image(HTTP_SERVER.'/'.DIR_WS_IMAGES . $product_info['products_image_xl'], $product_info['products_name'], '150', '150', '');

 

In other words hardcode in a image size. Note that I have arbitrarily chosen the values of 150 for width and height. You can use the numbers you need.

 

 

I don't know enough about the order editor to tell you how to integrate the mail manager. I'm sure it could be done. Look at how mail manager is integrated into the tell a friend module. In the order editor you could most likely use the same call used in catalog/tell_a_friend.php

 

//*******start mail manager***************// 
  if (file_exists(DIR_WS_MODULES.'mail_manager/tell_a_friend.php')){
   include(DIR_WS_MODULES.'mail_manager/tell_a_friend.php');
 }else{			   
	  tep_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address);
}
//*******end mail manager*****************//

 

Then you would write a module similar to catalog/includes/modules/mail_manager/tell_a_friend.php. Except in the order editor the whole thing might be best in the admin folders.

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

  • 3 weeks later...

Hi Jase,

 

I installed “Mail Manager” but I got below error message. Whats wrong with this?

 

1146 - Table '1244502_db.mm_responsemail' doesn't exist

 

select status, template, htmlcontent, txtcontent from mm_responsemail where mail_id = '0'

 

[TEP STOP]

 

Please help me to solve this issus.

 

Thanks,

Nandima.

Link to comment
Share on other sites

Jase, Thank you very much for your reply. But I already added required add-on to my db. That’s why I’m wondering at this stage.

 

Actually you mean below minted add-on I’m correct?

ALTER TABLE `customers` ADD `mmstatus` CHAR( 2 ) NOT NULL AFTER `customers_newsletter`

Link to comment
Share on other sites

Your link shows that you have the table 'mmstatus' installed but not the table 'mm_responsemail'. Recheck the installation instructions to make sure you get that table installed.

 

Yes, the admin is a bit off, but it will not affect how the program works. To fix it you will have to adjust the html a bit, or recheck that you have it installed correctly.

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

  • 3 weeks later...

We have modified the code a bit to get MM to work on a client site. Seems to be working now, but client wants to know if there is any way to confirm that messages have been received. They sent out over 2,300 messages and and only received 33 responses which they feel is a very low rate based on previous mailings. I have seen the progress bar i.e. '357 of 2,347 sent' and then at the end that '2,347 of 2,347 complete'. Is there any other reporting or tracking available beyond that? Thanks.

Link to comment
Share on other sites

One deficit with MM is that there is no checking on the validity of an email or even the format of an email. You can use OSCommerce to check the format of an email by putting restrictions in the database for the field that hold customer emails. ( I think it does this already?) Commercial mail programs such as Mail Chimp may have a way of 'pinging' email addresses to see if they exist, and there are also stand alone programs that will check to see if an email exists. (google 'email checking' or some such).

 

Validity and format checking at least lets you know if you are emailing valid email addresses. You can assume that in MM when you see the completed MM message that MM emailed all the records in the email field in customer table in the database. (noting of course that MM will attempt to email anything in that record regardless of whether it is an email or not)

 

You can also put in tracking links in emails, and get feedback if someone clicks on a link, and also programs exist that allow you to see if an email was opened or read. (Google 'email tracking' or similar)

 

If you get anything like the above incorporated into MM, I would love to see it. It would really enhance MM.

Edited by npn2531

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

  • 2 months later...

Hi. I'm just beginning to get into this contrib. I'm wondering if there's a way to say, "Dear _____," in the emails. For example, PayPal always has the user's name in the emails so that you know they are authentic PayPal emails. Does this contrib. allow for that? If not, any brief suggestions on how to build that feature?

 

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...

Hey Jase. I'm putting this into production now and I have a question on the "mailing rate in seconds between emails" in the BulkMail Manager. My webhost only allows 500 emails per hr. So, 500 emails per hr. ÷ 3600 secs. in an hour = 0.1388888... Can a value that is less than 1 be used here? If not, any ideas on a way around this?

 

Thanks!

Link to comment
Share on other sites

Oh... right. I was calculating emails per second. Whoops!

 

Still though, if I have about 1,700 emails to send out, wouldn't that have the script executing for a LONG time (over 3 hrs.)? Or is the bulk mail manager set up to send a chunk, then stop, then send a chunk, then stop, etc.?

 

Thanks.

Link to comment
Share on other sites

Turn the fraction over, or reverse the order you are punching the numbers into the calculator. ie 500\3600 not 3600\500

BTW, yes you can put in a number less than 1. Note however, that this number is the wait time between refreshes, and does not count the time the computer takes to refresh. Your web host service is only seeing the total time between emails sent. For example if set the time to '0.1' you are not really going to send 10 emails a second. You are going to send one email 1/10 of a second after the page reloads.

 

I used to teach math in High School and I wanted to ban calculators until students got to Geometry, because I think calculators ruin the ability to estimate a result. On the other hand the ancient Greek Philosophers were concerned writing would ruin the ability of people to memorize things.

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

Yes, sending out 1700 emails will take a long time, but that is the point of the program. It works on a continual basis, kinda simple. You can run it in a second window. It simply sends an email, waits, then refreshes. The refreshing simply reopens the page, and the script automatically restarts, sending an email and then waiting again until it refreshes.

So I guess in effect it is sending the emails in chunks, but a small chunk of 1 record.

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

Ok. Thanks for the clarification on how the script works. Just so I understand... in my scenario of sending 1,700 emails, it would refresh the page 1,700 times?

 

If so, maybe it would be better if the emails were sent in chunks of 20, 50, 100? I don't know if this is possible, but I'm just throwing the idea out there.

Link to comment
Share on other sites

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...