We have created a new module that sends out email reminders for users that have abandoned their shopping carts.
Printable View
We have created a new module that sends out email reminders for users that have abandoned their shopping carts.
The module is now available here: http://www.zen-cart.com/downloads.php?do=file&id=1589
This module automatically sends a reminder email to a registered user who has abandoned their cart. This is fully automated, and will send the email after however many hours you have set. You may also customize the email templates that are sent to the customer.
This is a great marketing module. Big Thanks to developer!
Could you please advise if there is any way to see what customers received this email? Any options to track opens, etc.
Is this only going to be sent once to the same person?
I've got everything up and running including cron job every hour but would love to be able to get some insights.
Kind Regards
Damian K.
Hi Damian,
Thank you for the comments. There is no tracking to see who received or opened the emails. It will only send one email unless the user logs back in and leaves items in their cart again. To make sure the cron is working, I would set the reminder hours to 1, login to the web site, add something to your cart and logout. In an hour you should get an email.
Thanks
-Sean
Hello. I have installed the mod on my zen cart install, v1.5.0. The cart_reminder_install.php runs without error. However after install, I see the new configuration section for the Shopping Cart reminder, but when I enter that section there are no options to configure.
A screen shot is available here: http://inspiredbydominic.com/store/screen.png
Please let me what I can do to diagnose the issue. Thanks!
-John
Not sure about this one. Did you make sure the SQL was installed properly? As you see in the image it works and all I did was drop the files in their proper directories and upload the SQL . Weird indeed as far as I can tell something did not upload or it corrupted during upload or your SQL was not installed. Maybe someone with the same issue as you have can be more assistance.
Attachment 11979
There were SQL errors in the cart_reminder_install.php (latest version).
On line 46:
The "configuration_group_id" variable isn't passed into the statement. I commented this out.Code:$sql = "UPDATE `".DB_PREFIX."configuration_group` SET `sort_order` = $last_id WHERE `configuration_group_id`=";
In addition to that, the statements that follow do not append the DB_PREFIX to the configuration table.
i.e.
should beCode:$sql = "INSERT INTO configuration ...
Thanks for all your help!Code:$sql = "INSERT INTO `".DB_PREFIX."configuration` ...
Also found a small bug in cart_reminder_cron.php, line 33.
should beCode:$sql ="SELECT configuration_value FROM ".DB_PREFIX ." configuration WHERE configuration_key = 'CART_REMINDER'";
(I removed a space after ".DB_PREFIX .")Code:$sql ="SELECT configuration_value FROM ".DB_PREFIX ."configuration WHERE configuration_key = 'CART_REMINDER'";
This script also needs the DB_PREFIX added to each statement.
We have submitted a new version with bug fixes for db prefix issues. Please check for version 1.1 as soon as it is approved on the download page: http://www.zen-cart.com/downloads.php?do=file&id=1589
Hello!
Is there a way to change the webpage links in the email reminder from http://webpage.com/index.php?main_pa...oducts_id=3666 to http://webpage.com/shop/index.php?ma...oducts_id=3666
our store is in "shop" folder.
regards!
Hi Gurrumino,
I have updated the package with some changes that should address the issue of the store folder. It looks like we didn't have the define variable DIR_WS_CATALOG in the links. I have not tested this on a live site yet so please let me know if this works so I can update the package on the Zen-Cart web site: https://www.box.com/shared/static/gx...nyhtkb9xpb.zip
Thanks,
-Sean
Hello gonsman, now is working perfectly ...:smile::D
Best Regards!
I noticed that the email sent by these module, the cart content is repeated, is just me? or is a little bug?
This is my first time, so please be gentle...
I have installed shopping cart reminder and been having the following email for days. It comes every hour, at the time chosen.
/bin/sh: 0: command not found
/bin/sh: php: command not found
The code I placed in cron is 0 ****cd/home/content/69/11416569/html/; php cart_reminder_cron.php > /dev/null
I think I saved this correctly on godaddy cron Job manager but don't know if I did code right. Go daddy says never seen 0 ****cd before my address info, but copied it from instructions info.
I have read all dialogue here, and checked cart reminder install to confirm changes above this were on my copy correctly. I believe this is the only thing installed affecting core files.
My site is reasonablerigging.com and the site is on the index level of the site.
Can someone tell me what to do that does not involve inflicting pain on myself...?
Many thanks,
Marc
Might try this instead (assuming the path is correct):
By starting with "php -f" it's saying "tell PHP to execute the file specified as the next parameter".Code:php -f /home/content/69/11416569/html/cart_reminder_cron.php > /dev/null
GoDaddy support can tell you what the correct syntax is to run PHP CLI (command-line-interface) with cron jobs on their servers.
Sometimes the -f is not needed.
Sometimes additional params are needed
Sometimes something other than the >/dev/null as a suffix might be required, depending on server configuration requirements and operating systems.
Thx dr. Byte, but that didn't work. Called godaddy and they recommended getting rid of the php -f and going direct, this occurred, so, getting deeper...
/home/content/69/11416569/html/cart_reminder_cron.php: line 1: ?php
: No such file or directory
/home/content/69/11416569/html/cart_reminder_cron.php: line 2:
: command not found
/home/content/69/11416569/html/cart_reminder_cron.php: line 3: /**
: No such file or directory
/home/content/69/11416569/html/cart_reminder_cron.php: line 4: backup: command not found
/home/content/69/11416569/html/cart_reminder_cron.php: line 5: backup: command not found
/home/content/69/11416569/html/cart_reminder_cron.php: line 6: backup: command not found
/home/content/69/11416569/html/cart_reminder_cron.php: line 7: backup: command not found
/home/content/69/11416569/html/cart_reminder_cron.php: line 8: backup: command not found
/home/content/69/11416569/html/cart_reminder_cron.php: line 9: backup: command not found
/home/content/69/11416569/html/cart_reminder_cron.php: line 10: backup: command not found
/home/content/69/11416569/html/cart_reminder_cron.php: line 11: backup: command not found
/home/content/69/11416569/html/cart_reminder_cron.php: line 12: **/
: No such file or directory
/home/content/69/11416569/html/cart_reminder_cron.php: line 13:
: command not found
/home/content/69/11416569/html/cart_reminder_cron.php: line 14: /bin: is a directory
/home/content/69/11416569/html/cart_reminder_cron.php: line 15:
: command not found
/home/content/69/11416569/html/cart_reminder_cron.php: line 16: =: command not found
/home/content/69/11416569/html/cart_reminder_cron.php: line 16:
: command not found
/home/content/69/11416569/html/cart_reminder_cron.php: line 17:
: command not found
/home/content/69/11416569/html/cart_reminder_cron.php: line 45: syntax error near unexpected token `('
/home/content/69/11416569/html/cart_reminder_cron.php: line 45: `/* Step 1: Remove all items in cart_reminder table that don't have an associated cart (where the users aren't logged in) */
'
What now? They recommended doing /web/cgi-bin/php5_3 as prefix
Does anyone know will this work with Ver 1.50?
Thanks Gonsman, but when I do that, I get this
/bin/sh: 0: command not found
/bin/sh: php: command not found
I have had it send the letter twice, but with way different code. Needing the right way to do it, and willing to try anything. Also, if someone could give me the correct format for changing the zen cart logo and replacing it with my logo, in the letter generated, it would be appreciated.
Marc
In GoDaddy, does it ask you for the day, month, hour and minute in a different field? If so, you may need to remove the first part of the cron job and only provide the command: cd /home/content/69/11416569/html/; php cart_reminder_cron.php > /dev/null
It also sounds like GoDaddy does not support the alias php so you need the full path the PHP executable. Something like cd /home/content/69/11416569/html/; /usr/bin/php cart_reminder_cron.php > /dev/null
It does ask for those items separately, so will try the codes and see which works.
1st one returned this
/bin/sh: pp: command not found
2nd returned this
/bin/sh: /usr/bin/php: No such file or directory
sending exact results so you can see what it takes and didn't take more clearly.
I appreciate every bit of your tracking this down. perhaps the next iteration...
Marc
According to GoDaddy, the PHP path is /web/cgi-bin/php5 (see http://support.godaddy.com/help/arti...-is-a-cron-job)
If this is the case, the command would be cd /home/content/69/11416569/html/; /web/cgi-bin/php5 cart_reminder_cron.php > /dev/null
neither of those worked and I sent a post which I tried to append to. Perhaps you saw it, I can repost the info.
First try was /bin/sh: php: command not found
second was /bin/sh: /usr/bin/php: No such file or directory
I appreciate every bit of your tracking this down. perhaps the next iteration...
if I remove the cd from the front of the equation i get this
/bim/sh: /home/content/69/11416569/html: is a directory
/bin/sh: php: command not found
You are a genius compared to many, supergenius compared to me....
It worked. Thank you. Now, how do I get the cart reminder email to show my logo rather than their logo? Just don't know whether html works, and suspect it doesn't.
It worked, perfectly. How may I edit the html email at email_template_cart_reminder.html to put my logo at the top rather than the zencart logo?
My sincere and major thanks. This has been an issue for 2 weeks for me...
To change the logo, you can edit the HTML to reference a different image or change the one at http://www.YOURWEBSITE.com/YOURSTORE...ail/header.jpg
Anyone knows why {SHOPPING_CART} is showing duplicate items?
--------------------------------------------------------------------------
We noticed you added some items to your shopping cart, but did not check out. If you experienced any trouble with our site or during checkout, we would be more than happy to help out. In addition, if you have any questions or concerns about our products or any of our policies, please let us know so we can address them promptly. It is our goal to ensure you have the best possible shopping experience, so please don't hesitate to reach out.
To send us an email, you can REPLY to this message or visit our contact page at http://xxxxxxxxxxxx.com/shop/index.p...age=contact_us
If you would like to speak with someone, please give us a call at 00.00.00.00.
For your convenience, we have listed the items currently in your cart below:
Wire Form - 7407 4” to 5”
Quantity: 1
http://xxxxxxxxxxxx.com/shop/index.p...products_id=23
Wire Form - 7407 4” to 5”
Quantity: 1
http://xxxxxxxxxxxx.com/shop/index.p...products_id=23
If you are ready to checkout, please login to your account at http://xxxxxxxxxxxx.com/shop/index.php?main_page=login and proceed to checkout.
If you don't remember your password, you can reset it here: http://euphoriaerotica.com/shop/inde...word_forgotten
Thank you,
Hello,
I get this error every day, many times a day. Has anyone seen this before or know what could be the issue?
This is what line 35 looks like:Code:[01-Sep-2013 09:54:01 America/New_York] PHP Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /home/mysite/public_html/cart_reminder_cron.php on line 35
Code:$row = mysql_fetch_assoc($result);
Hi,
I installed this add on, I don't encounter any installation error.
I checked the DB tables as well.
When I test, by login into user account, it doesn't create an entry in xxx_cart_reminder table. The table always empty.
I suppose, it should execute the add_cart_reminder() and create an entry in that table upon user login, but it didn't insert any entry. I feel strange.
\includes\modules\page\login\header_php.php
Thoughts ?PHP Code:
if (defined('CART_REMINDER') && CART_REMINDER == true){
include_once(DIR_WS_LANGUAGES . $_SESSION['language'] . '/' . 'cart_reminder.php'); //
/* Check to make sure customer isn't already in the table */
$sql = "SELECT * FROM " . TABLE_CART_REMINDER . " WHERE customer_id = :customersID";
$sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
$result = $db->Execute($sql);
if($result->RecordCount() == 0){
add_cart_reminder();
}
}
Regards,
Sky
I'm trying to setup the cron job and must be doing something wrong.
I use HostGator for my server
my latest attempt is:
php /home/andilyn/public_html/php cart_reminder_cron.php
which sends my admin an email of:
Status: 404 Not Found
Content-type: text/html
No input file specified.
cd /home/andilyn/public_html/cherrypitcrafts.com/; php cart_reminder_cron.php > /dev/null
which sent out this email to my admin:
/bin/sh: /home/andilyn/public_html/cherrypitcrafts.com: is a directory
Status: 404 Not Found
Content-type: text/html
No input file specified.
Anyone have any clues?
Is there a problem having two autoresponder programs at the same time. I received an error and have Autoresponder+ off and cart reminder which is on. Can one use both for their different purposes, or is this a problem for zencart?
Could someone tell me exactly HOW an entry is supposed to be created in the zen_cart_reminder table?
I logged in as a test user, and I added a couple items to my cart. I then hit logoff, and went to this table. However, it did NOT create an entry for my test account. Any idea why?
NOTE: I do see ONE entry in there for another user, so apparently the program does work and it does add entries in there. But I have no idea HOW it does it, or what TRIGGERS it.
Can someone let me know so I can at least replicate it working with my test account?
I want to create a functionality to allow store owner to choose how many minutes after cart is abandoned to send email ..immediately, 15,30,60
I have just checked and I realized that this field
["customers_basket_date_added"]=>
string(8) "20140126"
What I can do to work it with the hour, minutes or seconds.
I just worked out this with Bluehost
0 * * * * php /home/rjfinewo/public_html/wood-tissue-box-cover ; php cart_reminder_cron.php > /dev/null
They changed the cd to php.
It is working!:laugh:
Thanks now to work on the html page. Needs some polish but a great start.
Thanks to all
http://www.rjfinewood.com/wood-tissue-box-cover/
How can you test this? Do I have to wait the hour or what you have set before it send out a email?
Is this compatible with v1.5? I am asking since only 1.5.1+ seemed to be listed...
It should be OK with 1.5, but I have not tested it.
Hello,
Love the module. Thanks for taking the time to write and support it.
I've searched the thread, and from what I've seen, my Cart Reminder is working "correctly". However, if it is, I wonder if it can be changed.
The reminder email is only being sent if the user logs out. I can create a cart, checkout, create a new account, and log out, or I can log into an existing account, put stuff in a cart and log out. Either way, I get an email. If I just "go away" without logging out (which to me is almost the definition of an abandoned cart) I don't get an email.
Is this how it's supposed to work? Is there a mod to make it send an email if the user hasn't logged out? I wouldn't mind setting the timing so it was less aggressive if you're concerned about sending a reminder while the user is still logged in.
Thanks
Yes, I was searching the forum for this very issue.
If someone goes away without logging off, just closes the browser the email is not sent.
Also we have installed auto login modules where the customer gets logged in automatically when he comes back after some time , so he never gets logged off.
When we used the other module where we manually sent the emails, we used to get replies everytime we sent emails, this time we are very very few replies because the emails are not reaching them for this very reason.
Please let me know what can we do.
This module has been great for me using Zencart 1.5.1 however it looks like something needs updating for Zencart 1.5.4
When installed in 1.5.4 an error message is generated when a customer tries to login again or create an account. Looks like something needs changing in the header_php files in includes/modules/pages/login and includes/modules/pages/create_account_success folders. I restored the original 1.5.4 header_php files and the error message disappeared so I think it is the header_php.php files that are the problem.
I am using the Responsive all business template but don't think this relates to the issue.
My test site is at canadaflagshop.com/demo
Can you help?
Robert
using 1.54. our server is set in another time zone. so we set the time zone adding the command for our time zone in the php.ini.
now we are getting this message every minutes as an error
strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.
any clues how we can fix this in the coding?
cart_reminder_cron.php on line 101
i think if we remove the time zone setting in our php.ini file it goes away but the problem is now the orders that come in do not match our time zone.
THanks.
Using version zen cart 1.5.4 and COWOA version 2.4
Does anyone know if cart reminder will work with COWOA or will it only work with customers who have actually created an account?
Thanks
Hi,
I am still running Zen Cart version V1.3.9h will this module work on that version? If not can someone recommend something else that will work please.
Johanne
I'm currently using Recover Cart sales because it gives reporting on what sales were recovered due to emails sent out. I just installed the Cart Reminder Module as well and would like to have them work together. I think all that has to be done is a modification to cart_reminder_cron.php this file will need to set customer as contacted in rover cart module.
The code from recover cart module that does this I believe is located in file admin/recover_cart_sales.php
The part of the file/code that seems to set customers as contacted is:
PHP Code:
// Set Contacted Begin
if ($_GET['action'] == 'setconacted') {
$customer = $db->Execute("SELECT customers_firstname, customers_lastname
FROM " . TABLE_CUSTOMERS . "
WHERE customers_id ='" . (int)$_GET['customer_id'] . "' LIMIT 1");
// See if a record for this customer already exists; if not create one and if so update it
$donequery = $db->Execute("SELECT * FROM ". TABLE_SCART ." WHERE customers_id = '" . (int)$_GET['customer_id'] . "'");
if ($donequery->RecordCount() == 0)
$db->Execute("INSERT INTO " . TABLE_SCART . " (customers_id, dateadded, datemodified) VALUES ('" . (int)$_GET['customer_id'] . "', '" . date('Ymd') . "', '" . date('Ymd') . "')");
else
$db->Execute("UPDATE " . TABLE_SCART . " SET datemodified = '" . date('Ymd') . "' WHERE customers_id = " . (int)$_GET['customer_id']);
$messageStack->add(MESSAGE_STACK_CUSTOMER . $customer->fields['customers_firstname'] . ' ' . $customer->fields['customers_lastname'] . ' (ID ' . $_GET['customer_id'] . ')' . MESSAGE_STACK_SETCONACTED, 'success');
}
// Set Contacted End
I tried adding the following to cart_reminder_cron.php:
but it is not working? Anyone know why?PHP Code:
require('includes/application_top.php');
require(DIR_WS_CLASSES . 'currencies.php');
$customer = $db->Execute("SELECT customers_firstname, customers_lastname
FROM " . TABLE_CUSTOMERS . "
WHERE customers_id ='" . (int)$_GET['customer_id'] . "' LIMIT 1");
// See if a record for this customer already exists; if not create one and if so update it
$donequery = $db->Execute("SELECT * FROM ". TABLE_SCART ." WHERE customers_id = '" . (int)$_GET['customer_id'] . "'");
if ($donequery->RecordCount() == 0)
$db->Execute("INSERT INTO " . TABLE_SCART . " (customers_id, dateadded, datemodified) VALUES ('" . (int)$_GET['customer_id'] . "', '" . date('Ymd') . "', '" . date('Ymd') . "')");
else
$db->Execute("UPDATE " . TABLE_SCART . " SET datemodified = '" . date('Ymd') . "' WHERE customers_id = " . (int)$_GET['customer_id']);
Hi everyone,
I just installed this mod onto to my 1.54 cart.
Does this look ok for my cron job?
0 * * * * cd /homeX/XXXXXXXX/public_html/; php cart_reminder_cron.php > /dev/null
I have it setup at the defualt setting. I have a shopping cart filled up then logged out. Hours later still no email received.
any advice is much appreciated.
Ok, this worked once and only once. I receive emails that the cron ran but never get anymore email reminders. Is the email sent only once?
I have it set it up for sending every hour. So I assume everyone with a filled cart who has signed out will receive an email every hour until they do something about it. Is this correct?
This module has been very frustrating, I keep trying different commands thinking I did something wrong but receive no emails reminding me of my cart.
But, the module only sends the email once. It doesn't nag them every hour to go back to their cart.
The code appears to do this:
a) when a customer logs in or creates an account, a flag is set
b) when the cron job runs, it looks for any abandoned carts for customers that have a flag set
c) it emails whoever has the flag set
d) and clears all the flags that were set since the last time the cron job ran
For them to be reminded again they would need to log in again.
I got it now. Is there another recover type sales mod for 1.54 that you know of that I may be missing?
All I could find is a pay version, this one good ole Recover Cart mod which is only good for 1.53.
thank you
Anyway to set I should be copied on the email so that I know if this truly works?
In the Zen Cart orders.php class, at the bottom is where emails are sent, first to customer, then admin. You could use that code as inspiration for writing new code into your plugin to send another email to your admin.
Thanks. The changes are mostly good. You missed a couple changes in the "install" file, which I've updated in the zip.
Latest download is now compatible with MySQLi: Abandoned Shopping Cart Email Reminder
have installed and everything went smooth excep for cron job, when checking the email logs i keep getting error "PHP: syntax error, unexpected '$' in /home3/xxxxx/public_html/store/cart_reminder_cron.php on line 17"
any help would be appreciated thanks!
That's really strange. Line 17 is the first PHP statement in the file. The rest before it is just comments. Shouldn't be any error there.
What version of PHP is your cron running?
What do I need to do to see the contents of a shopping cart before the customer finalizes the order? And how do I know how many abandoned carts there are out there?
Hello, is this mod compatible with 1.5.6c?
It looks as though it should be.
Great thank you!
One additional question… Is it possible to set a flag so that the email to the customer is only sent once? It would be quite annoying to email them every hour, or even every day about an abandoned cart.
I think once the reminder has been sent once that is it. You can determine how many hours before the reminder is sent after the shopping cart has been abandon, so 1hour or 6hours etc. Your database should have a table SCART which I think is used to temporary hold abandon cart info which should be cleared once cron has done it's work. Important to set cron correctly.
Hi
Is this plugin compatible with ZenCart 1.5.6?
After a cursory look through the code I don't see why it would have any big issues on v156 or v157.
Excellent... going to install and I'll report back.
Looks like the demo code needs to be deprecated from the file for 1.5.7
getting a log error:
[17-Dec-2020 20:11:56 America/Chicago] PHP Fatal error: Uncaught Error: Call to undefined function zen_admin_demo() in /xxxxx/cart_reminder.php:26
Stack trace:
#0 /xxxxx/index.php(11): require()
#1 {main}
thrown in /xxxxx/cart_reminder.php on line 26
[17-Dec-2020 20:11:56 America/Chicago] Request URI: /xxxxx/index.php?cmd=cart_reminder&gID=36&cID=736&action=save, IP address: xxxxx
--> PHP Fatal error: Uncaught Error: Call to undefined function zen_admin_demo() in /xxxxx/cart_reminder.php:26
Stack trace:
#0 /xxxxx/index.php(11): require()
#1 {main}
thrown in /xxxxx/cart_reminder.php on line 26.
Not skilled enough to know how much of the old code needs to be removed :/
well... maybe my cursery skillz are getting better.
I removed the following:
and the configuration for the cart setup in Configuration>>Shopping Cart Reminder is now working.Code:// demo active test
if (zen_admin_demo()) {
$_GET['action']= '';
$messageStack->add_session(ERROR_ADMIN_DEMO, 'caution');
zen_redirect(zen_href_link(FILENAME_CART_REMINDER, 'gID=' . $_GET['gID'] . '&cID=' . $cID));
}
$cID = zen_db_prepare_input($_GET['cID']);
$configuration_value = zen_db_prepare_input($_POST['configuration_value']);
i have never used this module.
that said, i would restore the following lines that you deleted:
i'm not sure it will help with the problem. it might. but they should have been left in based on your initial error message.PHP Code:
$cID = zen_db_prepare_input($_GET['cID']);
$configuration_value = zen_db_prepare_input($_POST['configuration_value']);
the other 5 lines you removed were correct.
best.
Mod works, but I can't get the HTML emails to come out right. Below is what I get. Any ideas?
Code:--PHP-mixed-2bce926a2cd21eda3723a5a432d704ba
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Dear Todd,
We noticed you added some items to your shopping cart, but did not check out. If you experienced any trouble with our site or during checkout, we would be more than happy to help out. In addition, if you have any questions or concerns about our products or any of our policies, please let us know so we can address them promptly. It is our goal to ensure you have the best possible shopping experience, so please don't hesitate to reach out.
To send us an email, you can REPLY to this message or visit our contact page at https://dev.pezcollectors.com/index.php?main_page=contact_us
For your convenience, we have listed the items currently in your cart below:
Zipp European My Little Pony New Generation Pez Loose
Quantity: 1
https://dev.pezcollectors.com/index.php?main_page=product_info&products_id=7968
If you are ready to checkout, please login to your account at https://dev.pezcollectors.com/index.php?main_page=login and proceed to checkout.
If you don't remember your password, you can reset it here: https://dev.pezcollectors.com/index.php?main_page=password_forgotten
Thank you,
Pez Collectors Store
--PHP-mixed-2bce926a2cd21eda3723a5a432d704ba
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<base href="https://dev.pezcollectors.com/" />
<style type="text/css">
body {background-color:#ffffff; color:#000000; font-family:Verdana, Arial, Helvetica, sans-serif; text-align:center;}
a:link {color:#0066cc;}
a:hover {background-color:#eeeecc; color:#0066cc;}
a:visited {color:#0066cc;}
.holder {background-color:#f9f9f9; border:1px solid #9a9a9a; font-size:9px; text-align:left; width:550px;}
.header {font-size:10px; padding:0px; width:550px;}
.content {font-size:10px; padding:5px; width:550px;}
.footer {border-top:1px solid #9a9a9a; font-size:9px; text-align:center; width:550px;}
.extra-info {background-color:#cccc99; border:1px dashed #9a9a9a; font-size:10px; margin-top:10px; padding:5px; width:550px;}
.content-line {padding:5px; font-size:10px;}
.content-line-title {font-weight:bold; font-size:11px; padding-top:3px;}
.order-detail-area {background-color:#CCCC99; border:1px #9a9a9a; width:542px; padding:2px; font-size:10px; }
.product-details {font-size:10px;}
.product-details-num {font-size:10px; font-weight:bold;}
.order-totals-text {font-size:10px; font-weight:bold;}
.order-totals-num {font-size:10px; }
.comments {background-color:#FF6699; border:1px #9a9a9a; width:542px; padding:2px; font-size:10px; }
.address-block {background-color:#E4E8F3; border:1px solid #9a9a9a; margin-top:3px;}
.address {font-size:10px;}
.payment-detail, .payment-footer {font-size:10px;}
.extra-info {background-color:#cccc99; border:1px solid #9a9a9a; font-size:10px; margin-top:10px; padding:5px; width:550px;}
.extra-info-bold {font-weight:bold;}
.disclaimer {background-color:#f9f9f9; border:1px solid #cccccc; font-size:10px; margin-top:10px; padding:5px; width:550px;}
.disclaimer1 {color:#666666; padding:5px;}
.disclaimer1 a:link {color:#666666;}
.disclaimer1 a:visited {color:#666666;}
.disclaimer2 {color:#666666; padding:5px;}
.copyright {border-bottom:0px solid #9a9a9a; padding:5px;}
</style>
</head>
<body>
<div class="holder">
<!-- Header Section -->
<div class="header">
<img src="email/header.jpg" alt="logo" />
</div>
<!-- Content Section -->
<div class="content">
<div class="content-line">
Dear Todd,
<p>We noticed you added some items to your shopping cart, but did not check out. If you experienced any trouble with our site or during checkout, we would be more than happy to help out. In addition, if you have any questions or concerns about our products or any of our policies, please let us know so we can address them promptly. It is our goal to ensure you have the best possible shopping experience, so please don't hesitate to reach out.</p>
<p>To send us an email, you can REPLY to this message or visit our contact page at
<a href="https://dev.pezcollectors.com/index.php?main_page=contact_us">https://dev.pezcollectors.com/index.php?main_page=contact_us</a></p>
<p>For your convenience, we have listed the items currently in your cart below:</p>
<p>
</div>
<a href="https://dev.pezcollectors.com/index.php?main_page=product_info&products_id=7968">Zipp European My Little Pony New Generation Pez Loose</a><br>Quantity: 1<br><br>
<div class="content-line">If you are ready to checkout, please login to your account at https://dev.pezcollectors.com/index.php?main_page=login and proceed to checkout.
<p>If you don't remember your password, you can reset it here: <a href="https://dev.pezcollectors.com/index.php?main_page=password_forgotten">https://dev.pezcollectors.com/index.php?main_page=password_forgotten</a></p>
<p>Thank you,</p>
<strong>
<p>Pez Collectors Store</strong></p></div>
</div>
</body>
</html>
I have the exact same issue. All the emails come with both formats in the same email, and the top of the message begins with:
It's followed by the text format of the message. Then it has:Code:--PHP-mixed-1be1fba9a1aea56b1d5fd8093bc03262
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Followed is the HTML format of the message.Code:
--PHP-mixed-1be1fba9a1aea56b1d5fd8093bc03262
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
I originally thought it was due to how the template is edited and formatted when you go to Admin -->Define Pages Editor --> Define Cart Reminder. I edited as Plain Text before saving but that didn't remove the mixed PHP outputs in the template.
If anyone has any ideas, please let us know.
This is not my area of expertise, but basically this plugin builds the email as a 'mixed contents' email - ie it has the plain text version first, and the html version follows it. Mail clients then choose which one they want to view.
Whether it is because this plugin is buggy, or the way zen cart or your server sends out the email I don't know.
However you'd probably be better off following the zen cart approach which is to build the email specifically as text only or html only.
This section of code in cart_reminder_cron.php could be revised to achieve this.
Code:if($settings['html_email'] == true && $mail_info[$key]['customers_email_format'] == 'HTML'){
$headers.= "Content-type: multipart/alternative; boundary=\"PHP-mixed-".$random_hash."\"\r\n";
$mail_body = "--PHP-mixed-".$random_hash."\nContent-Type: text/plain; charset=\"iso-8859-1\"\nContent-Transfer-Encoding: 7bit\n\n";
$html_template = file_get_contents(DIR_FS_CATALOG.'email/email_template_cart_reminder.html');
}
else{
$headers.= "Content-Type: text/plain\n";
$mail_body = "";
}
$headers.= "From: ".$settings['email_from']."\n";
$subject = $settings['subject'];
if (file_exists(DIR_FS_CATALOG.'includes/languages/english/html_includes/'.$settings['template_dir'].'/define_cart_reminder.php')) {
$mail_body .= file_get_contents(DIR_FS_CATALOG.'includes/languages/english/html_includes/'.$settings['template_dir'].'/define_cart_reminder.php');
$mail_body .= "\n\n";
} else {
$mail_body .= file_get_contents(DIR_FS_CATALOG.'includes/languages/english/html_includes/define_cart_reminder.php');
$mail_body .= "\n\n";
}
if($settings['html_email'] == true && $mail_info[$key]['customers_email_format'] == 'HTML'){
$mail_body .= "--PHP-mixed-".$random_hash."\nContent-Type: text/html; charset=\"iso-8859-1\"\nContent-Transfer-Encoding: 7bit\n\n";
$mail_body .= $html_template;
$mail_body ."--PHP-mixed-".$random_hash."--";
}
I appreciate your suggestions, and I'll give it a try. To be clear, this plugin was working on our old server (meaning it would display text to text clients, or HTML to html clients).
But after we moved web servers, that is when we noticed the mixed PHP headers.....and it's only for this plugin. Other system emails like Order Updates are being sent just fine.
Hope you figure it out. I just have mine sending plaintext emails.
I probably then didn't give quite the best advice.
If a change of server causes the issue then logically you should look at what's different with sending out emails server-side.
However, also, the plugin might be adjusted to be 'more compatible' with your new server - something about the way the email is built by that section of code might be a little off - or perhaps out of date.