Zen Cart Logo
Forums / All Other Contributions/Addons / Autoresponder+ for ZC v1.3.x [support thread]

Autoresponder+ for ZC v1.3.x [support thread]

Views: 45,163

Results 1 to 20 of 232
22 Jul 2008, 12:09 PM
#1
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Autoresponder+ for ZC v1.3.x [support thread]

This is the support thread for the Autoresponder+ contribution.

This mod allows you to send a preset email to your customers after their order has finished.

You choose:
How many days after
Email subject and message

Features:
Supports text and html emails
Test mode
Enable/disable setting
Receive admin copy
Include customer name (various options)
Log sent emails

You choose the order status orders must have for the email to send. So if the order has been refunded or has not yet completed, customers are not bothered by an irrelevant email.

Requires a daily cron job to be scheduled.

Future plans:
Multiple preset emails
Include product details

This mod can be found in the Downloads section:
http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_60&products_id=1068

22 Jul 2008, 8:54 PM
#2
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Autoresponder+ for ZC v1.3.x [support thread]

A small bug has been found.

Some users may notice a Table Doesn't Exist error when loading autoresponder.php

In autoresponder.php, find this code:

$sql2="SELECT DISTINCT OSH.orders_id 
FROM " . AUTO_TABLE_ORDERS_STATUS_HISTORY . " OSH, orders O 
WHERE OSH.date_added like '".$order_day."%' 
AND OSH.orders_status_id='". AUTO_ORDER_STATUS_ID ."' 
AND OSH.orders_id=O.orders_id 
AND OSH.orders_status_id=O.orders_status";

Replace with this:

$sql2="SELECT DISTINCT OSH.orders_id 
FROM " . AUTO_TABLE_ORDERS_STATUS_HISTORY . " OSH, " . AUTO_TABLE_ORDERS . " O 
WHERE OSH.date_added like '".$order_day."%' 
AND OSH.orders_status_id='". AUTO_ORDER_STATUS_ID ."' 
AND OSH.orders_id=O.orders_id 
AND OSH.orders_status_id=O.orders_status";

This fix will be included in v1.1

Also in v1.1 will be the following features:
Support for 3 preset emails
Option to send emails to newsletter subscribers only
Validation preventing repeat loading

2 Aug 2008, 3:09 PM
#3
nguyenkhv avatar

nguyenkhv

New Zenner

Join Date:
Feb 2008
Posts:
35
Plugin Contributions:
0

Re: Autoresponder+ for ZC v1.3.x [support thread]

Steven300:

A small bug has been found.

Some users may notice a Table Doesn't Exist error when loading autoresponder.php

In autoresponder.php, find this code:

$sql2="SELECT DISTINCT OSH.orders_id
FROM " . AUTO_TABLE_ORDERS_STATUS_HISTORY . " OSH, orders O
WHERE OSH.date_added like '".$order_day."%'
AND OSH.orders_status_id='". AUTO_ORDER_STATUS_ID ."'
AND OSH.orders_id=O.orders_id
AND OSH.orders_status_id=O.orders_status";

> 
> Replace with this:
> 
> ```php
$sql2="SELECT DISTINCT OSH.orders_id 
FROM " . AUTO_TABLE_ORDERS_STATUS_HISTORY . " OSH, " . AUTO_TABLE_ORDERS . " O 
WHERE OSH.date_added like '".$order_day."%' 
AND OSH.orders_status_id='". AUTO_ORDER_STATUS_ID ."' 
AND OSH.orders_id=O.orders_id 
AND OSH.orders_status_id=O.orders_status";

This fix will be included in v1.1

Also in v1.1 will be the following features:
Support for 3 preset emails
Option to send emails to newsletter subscribers only
Validation preventing repeat loading

Thanks Steven,
I've been looking for this Mod.

  1. I'd like to ask if you will have more preset conditions like those by Magnetic One Similar mod?

  2. Will you haave Subscribe/Unsubscribe option for these emails?

  3. Request Customers to Post Products Reviews for products they have purchased?

3 Aug 2008, 10:52 PM
#4
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Autoresponder+ for ZC v1.3.x [support thread]

nguyenkhv:

I'd like to ask if you will have more preset conditions like those by Magnetic One Similar mod?

What preset conditions would you like to see implemented? I may be able to code them.

nguyenkhv:

Will you haave Subscribe/Unsubscribe option for these emails?

v1.1 has an option where emails will only send to newsletter subscribers. Currently I don't plan on having an independent subscribe option for the autoresponder.

nguyenkhv:

Request Customers to Post Products Reviews for products they have purchased?

This is likely to be in a future version, but not in v1.1. You can of course send out generic emails using the autoresponder that ask for product reviews (see mod's read_me for how I did this), but presently no product details can be included.

For those interested, v1.1 should be available sometime next week.

4 Aug 2008, 3:22 AM
#5
nguyenkhv avatar

nguyenkhv

New Zenner

Join Date:
Feb 2008
Posts:
35
Plugin Contributions:
0

Re: Autoresponder+ for ZC v1.3.x [support thread]

Hi Steven,
preset conditions such as:
Send automatic emails to customers who have placed an order within a time frame . i.e. 2 weeks.

about:

New Products (select only those which are related-same subcategories to products purchased by the customer)

Special Products(select only those which are related-same subcategories to products purchased by the customer)

Best Seller Products(select only those which are related-same subcategories to products purchased by the customer)

Featured Products(select only those which are related-same subcategories to products purchased by the customer)

Most Viewed Products(select only those which are related-same subcategories to products purchased by the customer)

Also Bought Products(select only those which are related-same subcategories to products purchased by the customer)

Thanks for putting your time and making your code available for all of us here.

4 Aug 2008, 3:29 AM
#6
nguyenkhv avatar

nguyenkhv

New Zenner

Join Date:
Feb 2008
Posts:
35
Plugin Contributions:
0

Re: Autoresponder+ for ZC v1.3.x [support thread]

HI Steven,
I would like to have these capabilities when sending out emails either manually or set automatically.

Send promotional emalls to:

  1. who have registered but have not placed an order for a particular time: i.e. 1, 2or 3 months.
  2. who have placed an order in the past, but has been inactive for a period like 2 , 3 months.
  3. who are very active: placed at least 1 order in a time frame. i.e. 1 week.
  4. who placed orders with an average amount range from $x to $y.
  5. who barely login or login frequently.
4 Aug 2008, 1:10 PM
#7
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Autoresponder+ for ZC v1.3.x [support thread]

I like the idea of a feature for sending emails to customers who have registered but not purchased. I'll see if I can implement this, and maybe some of your other requests, in a future version.

11 Aug 2008, 5:22 AM
#8
nguyenkhv avatar

nguyenkhv

New Zenner

Join Date:
Feb 2008
Posts:
35
Plugin Contributions:
0

Re: Autoresponder+ for ZC v1.3.x [support thread]

Hello Steven,
I downloaded the latest version, installed on ZC1.38a. Set it in live mode. set admin email to true. However, I still cannot get any email to the admin even thought the Cron Job is ran successfully.

Do you think someting wrong with my built in default Product Nofification of Zen Cart?
Because I nver get my product email notificaiton to work on my admin/tools?
Does your mod use the same code as does the ZC product notification?
Regards,

11 Aug 2008, 9:12 AM
#9
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Autoresponder+ for ZC v1.3.x [support thread]

Hi, if you're not receiving a copy of an email, it's very likely the original wasn't sent either. Do you know whether the live email was received by its recipient?

It could be you don't have the conditions set correctly. It could be an issue with your host's mail server. Maybe your email programme has started blocking things. Did you ever receive admin emails when in test mode? Maybe the cron job isn't set up right. What does the log show?

I'm not familiar with the Product Notifications code so I don't know how similar they are, but Autoresponder+ is in no way dependent on it.

Also which preset are you using? Preset #2 has a known problem caused by a typo. I only realised this last night and it will be fixed in v1.2 which I'm going to upload later today. In autoresponder.php, search for AUTO_MOD_2 and change to AUTO_MODE_2.

You could always try changing the admin email address to something else. In autoresponder.php, find this code:

$admin_email=STORE_OWNER_EMAIL_ADDRESS;

Change to something like..
$admin_email="[email protected]";

11 Aug 2008, 4:19 PM
#10
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Autoresponder+ for ZC v1.3.x [support thread]

v1.2 is currently pending approval.

This version adds the above feature whereby users can setup automatic emails for customers who have created an account but never ordered. It's quite robust in that the programme checks they haven't ever ordered just before sending out the email. It's also possible to email all account creating customers, regardless of order history.

I now have the structure to easily add additional queries, so this should be expected before long.

A typo in preset #2 is also corrected.

To upgrade to this version, a full uninstall of the previous version (if used) is required.

With v1.2, if you are having trouble triggering a test email, here are things to check:

Mod is enabled

Preset is enabled

Query set correctly

Test Mode is set

'Days After' set correctly

Subscribe Status is false

Time Validation is false

12 Aug 2008, 2:20 AM
#11
lindasdd avatar

lindasdd

Zen Follower

Join Date:
Jun 2007
Posts:
474
Plugin Contributions:
0

Re: Autoresponder+ for ZC v1.3.x [support thread]

Hmm.... so all my test emails were returned with the correct subject line, but the body of the email is:

           $EMAIL_MESSAGE_HTML

          $EMAIL_FOOTER_COPYRIGHT

 $EMAIL_DISCLAIMER

$EMAIL_SPAM_DISCLAIMER

$EXTRA_INFO

Any ideas on why this info wouldn't have flowed through correctly?

-lindasdd

12 Aug 2008, 9:44 AM
#12
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Autoresponder+ for ZC v1.3.x [support thread]

I can't replicate this error. What email program are you using? What Zen Cart version? What version of the mod? Do you have any other mods installed which you think might cause a problem?

For some reason you have undefined constants which email/email_template_autoresponder.html is trying to use.

Most of these constants should be defined in either:
includes/languages/english/email_extras.php
or
includes/languages/english/your_template/email_extras.php

Can you check to see the constants are there?

What's strange is that $EMAIL_MESSAGE_HTML should be defined by the mod itself. This makes me think there's a wider problem, one which at the moment I'm not sure what the cause would be.

Perhaps you could try using another admin email address to test with? In autoresponder.php, find this code:

$admin_email=STORE_OWNER_EMAIL_ADDRESS;

Change to something like..
$admin_email="[email protected]";

Related Tutorial/FAQ:
https://www.zen-cart.com/tutorials/index.php?article=95

12 Aug 2008, 10:40 AM
#13
patski avatar

patski

Zen Follower

Join Date:
Nov 2004
Location:
Deal, Kent, UK
Posts:
325
Plugin Contributions:
0

Re: Autoresponder+ for ZC v1.3.x [support thread]

Thanks so much for this mod - very very timely!

I'm getting an error on preset 2 (I'm in test mode) although it sends the email correctly:

Warning: Invalid argument supplied for foreach() in /usr/local/psa/home/vhosts/greenunion.co.uk/httpdocs/shop/includes/functions/functions_email.php on line 387

line 387 says:
{```php
foreach ($block as $key=>$value) {

12 Aug 2008, 10:56 AM
#14
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Autoresponder+ for ZC v1.3.x [support thread]

@patski

What Zen Cart version are you using?

12 Aug 2008, 11:51 AM
#15
patski avatar

patski

Zen Follower

Join Date:
Nov 2004
Location:
Deal, Kent, UK
Posts:
325
Plugin Contributions:
0

Re: Autoresponder+ for ZC v1.3.x [support thread]

1.3.7.1

12 Aug 2008, 11:56 AM
#16
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Autoresponder+ for ZC v1.3.x [support thread]

patski:

1.3.7.1

Ok I think this would be the problem. I've never used 1.3.7 but I imagine there are differences in functions_email.php. You said that the email sent correctly, so it might be best to just ignore this error?

12 Aug 2008, 1:28 PM
#17
patski avatar

patski

Zen Follower

Join Date:
Nov 2004
Location:
Deal, Kent, UK
Posts:
325
Plugin Contributions:
0

Re: Autoresponder+ for ZC v1.3.x [support thread]

Thanks - there would appear to be significant differences between the two files.

// check for injection attempts. If new-line characters found in header fields, simply fail to send the message
    foreach(array($from_email_address, $to_address, $from_email_name, $to_name, $email_subject) as $key=>$value) {
      if (eregi("\r",$value) || eregi("\n",$value)) return false;
    }

Not sure what would happen if I simply inserted this code into the 1.3.71 version or if I uploaded the whole version 8 file without fully upgrading....:shocking:

My test is only sending to one person at the moment so not sure what happens when more than one recipient is in the run.

12 Aug 2008, 1:40 PM
#18
patski avatar

patski

Zen Follower

Join Date:
Nov 2004
Location:
Deal, Kent, UK
Posts:
325
Plugin Contributions:
0

Re: Autoresponder+ for ZC v1.3.x [support thread]

PS: Just uploaded the new functions_email file and PGA.....

12 Aug 2008, 1:53 PM
#19
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Autoresponder+ for ZC v1.3.x [support thread]

patski:

and PGA.....

What does this stand for? :blush:

12 Aug 2008, 2:17 PM
#20
patski avatar

patski

Zen Follower

Join Date:
Nov 2004
Location:
Deal, Kent, UK
Posts:
325
Plugin Contributions:
0

Re: Autoresponder+ for ZC v1.3.x [support thread]

problem gone away..... :D

ps does your structure to add new queries extend to customer location......