Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Mail Manager


npn2531

Recommended Posts

You can simply not fill in the plain text in the admin in mail manager when you compose your email. However note that all emails can have a plain text alternative anyway embedded in the email. Go to your preferred mail program and find the option to read the email source. You will see that there is always a text alternative. If you don't fill in the plain text, and send the email, and the recipient has his email set to display plain text, then they will see a text rendering of your html email which can be difficult to read.

 

Yea I figured it might cause more harm than good for that specific reason. Thanks again for taking time to help me out with all these issues.

Link to comment
Share on other sites

Hi, on the sale_followup module i've changed the xsell query to this:

$xsell_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_name, p.products_tax_class_id, products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, specials_new_products_price
from " . TABLE_PRODUCTS_XSELL . " xp left join " . TABLE_PRODUCTS . " p on xp.xsell_id = p.products_id
left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "'
left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id
where xp.products_id in (select p.products_id
	  from " . TABLE_ORDERS_PRODUCTS   . " op, " . TABLE_PRODUCTS . " p
	  where op.products_id = p.products_id
						   and p.products_status = '1'							
						   and op.orders_id = '" . $mail['orders_id'] . "')
and p.products_status = '1'
and p.products_id not in (select p.products_id
	  from " . TABLE_ORDERS_PRODUCTS   . " op, " . TABLE_PRODUCTS . " p
	  where op.products_id = p.products_id
						   and p.products_status = '1'							
						   and op.orders_id in (
	 select orders_id from " . TABLE_ORDERS . "
	 where customers_id = '" . $mail['customers_id'] . "'))
order by sort_order asc limit " . $limit_xsell_products."");

 

The reason for this change is that i've put the while loop of the xsell out of the while loop of the ordered products so first i have to look for the xsell products of all the products purchased.

Then, while i was checking it, i thought that i should recommend products that the customer have not purchased yet and it's ridiculous to recommend products that he/she already bought so that is the final code.

 

the first susbelect shows the products_id of the products purchased on the order so that we can get the xsell products of that items.

the third subselect show the orders_id from the orders made by a customer and is passed to the second subselect which looks for products_id that where bought in that orders. So in that way we exclude the items bought in each order from that customer and show items that have not bought yet.

 

I hope you understand me, and sorry for my English.

Link to comment
Share on other sites

Your English is 95% excellent, and this is a great improvement to the contribution. It is indeed silly to recommend an item already purchased. I will test this out, but if you feel you have it working right, please post this as an update to the contribution.

 

http://addons.oscommerce.com/info/8120

 

The sale_followup module on the mail manager is one of it's best and unique features.

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

Hi, does this work on 2.3? I've edited all the files and made the database changes as stated in the documentation but it's not working. The Mail Manager thing that's supposed to show in the menu shows all the way at the top of the page outside of the actual menu and it doesn't have the subcategories (bulkmail manager, response mail, template manager, etc.). All I get when I click the Mail Manager button outside the actual navigation is Response Mail Manager, with the Tell A Friend, Password Forgotten, Status Update, etc. sub menus.

 

Are the changes suggested here: http://www.css-oscommerce.com/mail-manager-for-oscommerce/ actually good for 2.3? There must be a problem with them, I've restored and re-tried 3 times now and the same result each time.

 

Hope you can help!

 

Thanks.

 

Edit-

I realized that the pages are actually accessible, but only through changing the url to the bulkmail, template manager, etc. pages. I'm confused about why they're not showing as submenus under the Mail Manager category - and why that category is outside of the navigation menu itself.

 

I'm no pro with this, but I'm pretty sure that either there's something wrong in the changes as stated in the documentation, or I'm reading them wrong. The thing is, I've done precisely as it says (I don't know enough to notice mistakes if there'd be any) three times and it's not working.

Edited by ben_dph
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

We installed this a few days ago. All pretty much working except password reset. Not sure what is going on here but have been testing using my own account and getting email with EMAIL_PASSWORD_REMINDER_SUBJECT

 

appearing as the subject and appearing in the email is: EMAIL_PASSWORD_REMINDER_BODY

 

That is it!

 

My website is www.nontando.com

 

Thanks, Gary

Edited by bksbeat
Link to comment
Share on other sites

EMAIL_PASSWORD_REMINDER_SUBJECT and EMAIL_PASSWORD_REMINDER_BODY are defined in catalog/includes/languages/english (or your language)/password_forgotten.php. Make sure you have the code below working in catalog/password_forgotten.php.

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PASSWORD_FORGOTTEN);

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

In includes/modules/mail_manager/status_update.php

$status_newhtml = sprintf(EMAIL_TEXTHTML_STATUS_UPDATE, $orders_status_array[$status]);

 

The EMAIL_TEXTHTML_STATUS_UPDATE seems to be incorret. I've tried several variations including:

 

EMAIL_TEXT_HTML_STATUS_UPDATE

EMAIL_HTML_STATUS_UPDATE

 

but neither of those seem to be correct. If you change it to EMAIL_TEXT_STATUS_UPDATE it does not put in the line breaks in the status update emails. What is is supposed to be in order to parse out the line breaks properly or am I also missing something else in a different file?

Link to comment
Share on other sites

Solution to Status_Update issue above:

 

In admin/includes/languages/english/orders.php:

Add before closing ?> tag:
define('EMAIL_HTML_STATUS_UPDATE', 'Your order has been updated to the following status.' . "<br><br>" . 'New status: %s' . "<br><br>" . 'Please reply to this email if you have any questions.' . "<br>");

 

In includes/modules/mail_manager/status_update.php:

Find:
$status_newhtml = sprintf(EMAIL_TEXTHTML_STATUS_UPDATE, $orders_status_array[$status]);
Replace with:
$status_newhtml = sprintf(EMAIL_HTML_STATUS_UPDATE, $orders_status_array[$status]);

 

In addition to the fix above, when you update comments with this mod it would also include the words "The comments for your order are..." into the actual order comments box on the orders screen. This is because $comments is redeclared in included/modules/mail_manager/status_update.php. To fix this do the following:

 

In included/modules/mail_manager/status_update.php:

Find all instances of $comments and replace with $email_comments

 

In your admin go to Mail Manager -> Click on "Status Update" --> Click Edit -->

Change $comments to $email_comments in both the HTML Content and the Text Content Boxes.

Link to comment
Share on other sites

One more issue I am looking at in regards to the status_update is that the line breaks doe not transfer into the email.

 

For example:

 

If my comments are:

Order shipped.
Tracking# 11111
Have a nice day

 

It appears in the email as:

Order shipped. Tracking# 11111 Have a nice day

Link to comment
Share on other sites

We have installed this add-on and it is great. Having one issue which I am not sure if it related to mail manager but it use to work before and now does not, i.e. when customer registers/creates new account. I use to receive a confirmation to my email letting me know. I am now not receiving this email. I am using "Response Mail" options and those are working, i.e. customer received emails, and when I test to my email I get those emails. Any ideas?

 

Thanks, Gary

Edited by bksbeat
Link to comment
Share on other sites

I have one or two more issues/questions:

 

When we installed this add-on, in BulkMail manager it had a default weekly newsletter. This newsletter has sent flag = true with a date of 7/15/11 as date sent. I have since edited this newsletter using the layout, etc for my own use. When I tried to send it, it came back with 0 sent. The "test" works fine. Is this because it has already been sent and you cannot resend it? In this regard, what if I want to use the same format for my newsletters, i.e. ideally I would like to copy an existing one and just change images, text, etc - how would I do this?

Thanks, gary

Link to comment
Share on other sites

In mail manager there is a working sample newsletter called the 'sale followup' email that is date sensitive, but not a weekly newsletter. This sale followup has two variables

$wait_until = date('Y-m-d g:i:s', strtotime("-10 days"));
$ignore_before = date('Y-m-d g:i:s', strtotime("-30 days"));

That allow it to select recent orders and prepare a mailing with info from those orders, and the customers who placed those orders.

 

Also note that mail manager selects customers to mail to based on the value in a new field in the customers table called mmstatus. In each mailing, after it mails a customer it updates the value in this field from '0' to '9'. Once it completes a mailing, all the customers that were selected for mailing have a mmstatus of '9'. It then resets or changes this value in mmstatus back to '0' for all the customers it has mailed to.

 

If the value in mmstatus does not get reset back to '0', then the next time you run that mailing, it will mail 0 customers and say 0 sent. My guess is that somebody has changed something in the original programming and this value is not being reset. Check your customer list after a mailing and see if you have any customer records with a mmstatus value of '9'. If you do then something is amiss.

 

Also note that mail manager does not use the values 'true' or 'false' in any of it's programming. It does use php terminology == and != however.

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

I have never sent a mailing yet. I did try and send it and it just said customer sent=0? I am not sure about the mmstatus and why it does not send any mailing - What I am trying to understand, as per my earlier message, can I use a newsletter that already has a flag = sent and how, is at all, can I copy and existing newsletter rather than have to recreate a a new one each time.

Edited by bksbeat
Link to comment
Share on other sites

The 'flag=sent' is not something that is part of mail manager, I don't know what that is. In mail manager you can send the same newsletter over and over. You can also use existing newsletters created in other applications. Just open the bulk mail panel and click 'new newsletter' and then paste the html into the window. The process is identical to creating a newsletter in the standard oscommerce install.

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

Jase - Just had one or two more questions that are puzzling me.

When you are in Response Mail Manager>Status update and you do a "test" the subject header you receive in the email says "Status Update". Yet, when you change the status of an order within admin, eg. processing, shipping, etc the subject header says "Order update". The format and template is the same so that part is working? Is this suppose to be like that?

Edited by bksbeat
Link to comment
Share on other sites

Yes, the subject title changes. The subject in that email will be the title of letter. It is the value in the title field from the table mm_responsemail.

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

Yes, 20,000 customers would take quite a while, even if you set the refresh rate to 1. However, that is the point of the program, to allow you to slow down the rate of a mailing so that you don't exceed bandwidth limitations shared web hosting providers impose. In other words the program is designed for people, like me, who have their website on a $5-$10/month site from providers like Bluehost and Godaddy.

 

The refresh aspect of the program is how the throttling is accomplished, by putting in a waiting period between emails. Plus instead of executing one server command that sends 20,000 emails you execute 20,000 quick server commands that send one email each. (the refresh command takes place on your computer, the actual mailing command takes place on the web server - in other words, the OSCommerce program on the web server receives and completes the command to select and email a customer 20,000 times). This means that if the program, computer or internet crash during the mailing, you simply restart the mailing and it will pick back up right where it stopped, even if you restart on a different computer or from a different location.

 

It will also run in a separate window of the same computer you are using for anything else.

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

You would probably get erratic results to run it in more than one window. The best thing to do would be to rewrite the module. If you understand the basics of writing a 'php while loop' to access multiple records in a database you can accomplish this rewrite without too much difficulty.

 

Open admin/mm_bulkmail.php Find

 } elseif ($action == 'confirm_send') { 

about line 361 under the 'confirm send' case. Find the simple query, '$newsletter_query', and work in a 'while' statement. You will have to run through the entire case and make other misc changes, such as deleting the refresh rate, etc.

 

Note you only have to rewrite the 'confirm send' case, but that case runs about 200 lines.

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

This looks great but OMFG what a frustration...after 2 solid hours of work I find this when importing the .sql file

 

Well...that sucks...can you please help me because your addon seems perfect to my needs

MySQL meldt: dot.gif

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE IF NOT EXISTS `mm_bulkmail` (

`bulkmail_id` int(11) NOT NULL AUT' at line

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