Excellent... going to install and I'll report back.
Printable View
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.