Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

AutoEmailer


Jack_mcs

Recommended Posts

  • Replies 197
  • Created
  • Last Reply

Top Posters In This Topic

You're correct. The current version has a problem. I have uploaded a new version that fixes this problem.

 

Jack

 

Hello Jack,

 

Many thanks for the reply and upload of the New version.

I did try with the new announce file but still has no out put.

there ae no error message, when you open

in a browser, the page comes up done but no E mail sent.

 

I wonder the database link is ever opened.

(I have noticed that you make the call in auto_emailer.php

and not in auto_announce.php.)

 

I thought it was direct from the auto_announce in a previous

release.

 

Any ideas please ?

 

Shred

Link to comment
Share on other sites

The first release was meant to run as a cron job and could not be accessed via admin. That was completely changed and now works as most other contributions. If you have files from previous versions they should be delteted. Also make sure your cron command is looking at the proper file to execute.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

The first release was meant to run as a cron job and could not be accessed via admin. That was completely changed and now works as most other contributions. If you have files from previous versions they should be delteted. Also make sure your cron command is looking at the proper file to execute.

 

Jack

 

Can your latest version be run from browser ?

I try to run from the Browser for trials till I can get them working

 

Cheers

Link to comment
Share on other sites

If the permissions on the file are correct then your host is blocking it somehow.

 

Jack

 

Hello Jack,

I nearly give up !!

 

I can't get announce to work at all .

On trying auto_orders I get

 

 

Sun Feb 12 16:48:01 2006] [error] PHP Warning:  mysql_query(): Unable to save result set in /home/affili43/affili43-www/catalog/admin/auto_emailer/auto_orders.php on line 44
[Sun Feb 12 16:48:01 2006] [error] PHP Warning:  mysql_query(): Unable to save result set in /home/affili43/affili43-www/catalog/admin/auto_emailer/auto_orders.php on line 44
[Sun Feb 12 16:48:01 2006] [error] PHP Warning:  mysql_query(): Unable to save result set in /home/affili43/affili43-www/catalog/admin/auto_emailer/auto_orders.php on line 44

Link to comment
Share on other sites

  • 1 month later...

Hey,

 

The issue is the newline specified in the class.

 

It currently reads:

 

define("EmailNewLine", "\r\n");

 

Your SMTP server (likey QMail) mangles any line sthat already have the correct newline encoding (\r\n) and replaces them with \r\r\n. This is why you see the HTML rendering as text in your email client.

 

Replace the above line with

 

define("EmailNewLine", "\n");

 

This should fix the problem.

 

Let me know if you have any other questions.

Edited by wmfwlr
Link to comment
Share on other sites

Hello,

 

first of all thanks a lot for this great contribution.

 

But I am facing right now a strange error msg:

 

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /usr/www/users/rotolosa/apfelplus/shop/admin/auto_emailer/class.Email.php on line 261

 

same for lines : 265,270,281,292,297,304

 

It seems like my actual PHP version 4.3.10 doesn't support &$var calls. I tried to remove all &'s. This will result in a wired formated email but eleminates the error msgs.

 

I was wondering that nonelse faces this problem.

Link to comment
Share on other sites

Hey

 

My quess is that you are actually running PHP 5. First, undo all your changes pertaining to the reference error. Change the line at roughly 620 that says

 

function Add($mimeBlock=null)

 

to be

 

function Add(&$mimeBlock=null)

 

This allows the method to accept the MIME blocks being added as references (but detected at 'compile' time).

 

Then change each of the lines that calls the Add method (roughly on the lines you indicated) to remove any reference operator. For example,

 

$this->RootContainer->Add($contentContainer);

 

instead of

 

$this->RootContainer->Add(&$contentContainer);

 

If this does not help I have a version that should fix your problem I can email to you directly.

Edited by wmfwlr
Link to comment
Share on other sites

  • 5 weeks later...

I am receiving the following from my cron-job...

 

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /mnt/web_l/d29/s29/a0006nm2/www/RaidersStore/nfoscomm/catalog/admin/auto_emailer/auto_emailer.php on line 21/>

Could not connect

 

Any help would be greatly appreciated...

 

Thanks!

Steve

Link to comment
Share on other sites

I'm using a different cron now and it is working.... except that now i get...

 

Parse error: parse error, unexpected ',' in /mnt/web_l/d29/s29/a0006nm2/www/RaidersStore/nfoscomm/catalog/admin/auto_emailer/auto_orders.php on line 28

 

That's a setup problem on the server. You should ask your host what to take a look at it.

 

Jack

Link to comment
Share on other sites

  • 4 weeks later...

Hello everybody!

 

I 've just found this contribution and I would like to know if it's also possible to send an invoice to each customer as a pdf attachement (automatically when his order status gets updated). In my store each purchase creates automatically an invoice.pdf. Would it be possible to have this invoice.pdf get mailed to each customer with this contribution?

 

Many thanks in advance,

 

Johannes

Link to comment
Share on other sites

Yes. The orders and customers modules show how to attach a csv file and send it. You would need to alter it to send the pdf but it should work.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 months later...

It could but there isn't a module for that purpose right now. Plus, that would just be duplicating the already existing code so doesn't seem to make much sense.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 weeks later...

Hey there ppls... I'm looking for a little advice. I've taken this great contribution and changed it a little for my needs. I'm trying to create an auto setup that emails customers who have chosen to pay via Bank deposit. If payment hasnt been received in 5 days (i.e. orders_status is still set on 'awaiting payment'), I want to send out an email saying 'please pay now..'. After 8 days, I want to send out an email saying 'order has been cancelled'. I've been modifying the auto_announce.php to try and do this. The last thing (*I think*) that I'm having trouble with is telling the module to send out if the order is XX days old. This is what I'm using...

$adjDate = sprintf("%s-%s-%s", $adjYr, substr($customer['date_purchased'], 5, 2),substr($customer['date_purchased'], 8, 2));
// Stop Date Selection
     $diff = DifferenceBetween($adjDate, $currentDate);

// Start Date Difference
     if ($diff == 5 )
// Stop Date Difference      
     {

I've introduced date_purchased in the sql query before this. The line 'if ($diff == 5 )' is where I'm having troubles.

 

If you need me to post more of the code to see what's going on, please let me know.

 

TIA

~bobsi18~

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

Firstly, fantastic contribution. This is exactly what I was looking for.

 

I was wondering though if anyone has any ideas on how to change the price displayed in the automatic orders when it is emailed to me to show the gross price, tax, shipping etc. similar to that of the orders confirmation page. At the moment it only shows the price as the non-taxed price.

 

I have tried my best to do this but my php skills are lacking a bit. I can't figure out how to call the correct database table to retreive the information I need.

 

I would appreciate any help and am happy to post this as an update to the contribution when I get it right.

 

Thanks

 

Adam Heaney

Adam J. Heaney

Fsmtrading.com.au

Link to comment
Share on other sites

The taxed price isn't stored in the database. The code would have to be altered to calcualte the taxed price before sending it. There is a built-in function named tep_get_tax_rate that is used for such a purpose.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

The taxed price isn't stored in the database. The code would have to be altered to calcualte the taxed price before sending it. There is a built-in function named tep_get_tax_rate that is used for such a purpose.

 

Jack

 

Thanks for that however I was wondering if anyone would know how to send the final price including shipping etc.? Would that be stored in the database after the customer has purchased the product?

 

Thanks,

 

Adam Heaney

Adam J. Heaney

Fsmtrading.com.au

Link to comment
Share on other sites

Yes, it is stored in the orders total table.

 

Jack

 

 

Thanks Jack,

 

Much appreciated and very helpful. I have now got the final price etc.

 

I am having issues separating the class with ot_tax, ot_shipping etc. into separate columns for the html output.

 

at the moment I have class='ot_total' I tried using the where class <> 'ot_tax' and class <> 'ot_shipping but it comes out in the html as a separate row which means the totals add up incorrectly. any ideas to have them in columns like the rest??

 

Thanks

 

Adam Heaney

Adam J. Heaney

Fsmtrading.com.au

Link to comment
Share on other sites

  • 1 year later...

It was working fine until recently but now the script is not being executed and I'm receiving the following error message:

 

PHP Warning:  Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name]().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/class.Email.php on line 261
PHP Warning:  Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name]().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/class.Email.php on line 265
PHP Warning:  Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name]().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/class.Email.php on line 270
PHP Warning:  Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name]().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/class.Email.php on line 281
PHP Warning:  Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name]().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/class.Email.php on line 292
PHP Warning:  Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name]().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/class.Email.php on line 297
PHP Warning:  Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name]().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/class.Email.php on line 304
PHP Warning:  include(): Unable to access ../../includes/configure.php in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/auto_emailer.php on line 13
PHP Warning:  include(../../includes/configure.php): failed to open stream: No such file or directory in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/auto_emailer.php on line 13
PHP Warning:  include(): Unable to access ../../includes/configure.php in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/auto_emailer.php on line 13
PHP Warning:  include(../../includes/configure.php): failed to open stream: No such file or directory in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/auto_emailer.php on line 13
PHP Warning:  include(): Failed opening '../../includes/configure.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/auto_emailer.php on line 13
PHP Notice:  Use of undefined constant DB_SERVER - assumed 'DB_SERVER' in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/auto_emailer.php on line 15
PHP Notice:  Use of undefined constant DB_SERVER_USERNAME - assumed 'DB_SERVER_USERNAME' in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/auto_emailer.php on line 15
PHP Notice:  Use of undefined constant DB_SERVER_PASSWORD - assumed 'DB_SERVER_PASSWORD' in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/auto_emailer.php on line 15
PHP Warning:  mysql_connect(): Unknown MySQL server host 'DB_SERVER' (1) in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/auto_emailer.php on line 15
Unable to connect to database.

 

Any ideas?

Absinthe Original Liquor Store

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