Zen Cart Logo
Forums / Addon Admin Tools / Abandoned Shopping Cart Email Reminder

Abandoned Shopping Cart Email Reminder

Views: 73,453

Results 81 to 92 of 92
17 Dec 2020, 11:14 PM
#81
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Abandoned Shopping Cart Email Reminder

Excellent... going to install and I'll report back.

18 Dec 2020, 2:18 AM
#82
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: Abandoned Shopping Cart Email Reminder

DrByte:

After a cursory look through the code I don't see why it would have any big issues on v156 or v157.

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 :/

18 Dec 2020, 2:24 AM
#83
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: Abandoned Shopping Cart Email Reminder

Carbonless:

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:

        // 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']);

and the configuration for the cart setup in Configuration>>Shopping Cart Reminder is now working.

18 Dec 2020, 2:26 AM
#84
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: Abandoned Shopping Cart Email Reminder

Carbonless:

well... maybe my cursery skillz are getting better.

I removed the following:

    // 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']);
> 
> and the configuration for the cart setup in Configuration>>Shopping Cart Reminder is now working.


Well jumped the gun a little... It id giving the message, after setting the time from to 1 hour, that the email must be sent after 1 hour, but still displays 6 hours in the default setup.

I'll have to wait and see if the cron job does its thing.
18 Dec 2020, 2:30 AM
#85
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: Abandoned Shopping Cart Email Reminder

Carbonless:

Well jumped the gun a little... It id giving the message, after setting the time from to 1 hour, that the email must be sent after 1 hour, but still displays 6 hours in the default setup.

I'll have to wait and see if the cron job does its thing.

I removed too much of the code... I removed the post statement, put it back in, configures beautifully.

18 Dec 2020, 2:55 AM
#86
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,962
Plugin Contributions:
8

Re: Abandoned Shopping Cart Email Reminder

Carbonless:

well... maybe my cursery skillz are getting better.

I removed the following:

    // 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']);
> 
> and the configuration for the cart setup in Configuration>>Shopping Cart Reminder is now working.

i have never used this module.

that said, i would restore the following lines that you deleted:

```php
        $cID = zen_db_prepare_input($_GET['cID']);
        
        $configuration_value = zen_db_prepare_input($_POST['configuration_value']);

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.

the other 5 lines you removed were correct.

best.

16 Oct 2023, 12:07 AM
#87
gothstone avatar

gothstone

Zen Follower

Join Date:
Jun 2005
Posts:
330
Plugin Contributions:
0

Re: Abandoned Shopping Cart Email Reminder

Mod works, but I can't get the HTML emails to come out right. Below is what I get. Any ideas?

--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>
17 Aug 2024, 7:54 PM
#88
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Abandoned Shopping Cart Email Reminder

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:

--PHP-mixed-1be1fba9a1aea56b1d5fd8093bc03262
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

It's followed by the text format of the message. Then it has:

--PHP-mixed-1be1fba9a1aea56b1d5fd8093bc03262
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Followed is the HTML format of the message.

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.

18 Aug 2024, 6:54 AM
#89
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
285
Plugin Contributions:
1

Re: Abandoned Shopping Cart Email Reminder

Jeff_Mash:

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:

--PHP-mixed-1be1fba9a1aea56b1d5fd8093bc03262
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

> 
> It's followed by the text format of the message.   Then it has:
> 
> ```
--PHP-mixed-1be1fba9a1aea56b1d5fd8093bc03262
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Followed is the HTML format of the message.

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.

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

		}
20 Aug 2024, 6:42 PM
#90
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Abandoned Shopping Cart Email Reminder

royaldave:

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.

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.
20 Aug 2024, 11:32 PM
#91
gothstone avatar

gothstone

Zen Follower

Join Date:
Jun 2005
Posts:
330
Plugin Contributions:
0

Re: Abandoned Shopping Cart Email Reminder

Hope you figure it out. I just have mine sending plaintext emails.

21 Aug 2024, 2:56 AM
#92
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
285
Plugin Contributions:
1

Re: Abandoned Shopping Cart Email Reminder

Jeff_Mash:

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.

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.