Home > Time Savers, Zen Cart > Zen Cart Welcome Email Editor

Zen Cart Welcome Email Editor

July 31st, 2008

I’ve just dug up a script that I wrote a while back for someone. It’s not the most advanced thing in the world and it does what it says on the tin.

Within Zen Cart there is a menu on the admin pages called ‘Tools’ which has an option called ‘Email Welcome’. This script is a default Zen Cart page to simply show you what the welcome email looks like.

Screenshot 1

hint: be sure to turn on html emails and it will show you both the html and text versions (default text only is set)

I have modified this script to allow the editing of these pages if you have little or no knowledge of writing PHP although some HTML skill is required.

Zen Cart puts together a number of PHP Defines to build the welcome email and normally when you want to modify it then you have to trawl through three of four files of these defines to get to the one you want.

This script basically does that for you and parses/updates the files necessary with your new information. The following image shows the new page and i’m sure no explanation is needed to show you how to use it.

Screenshot Thumbnail 2

Known Bugs: the only thing I know to be wrong with it is that some defnes reference other defines and this script doesn’t respect that. There are only one or two defines like this so nothing to worry about unless you intend to change the name of the shop owner frequently. If you do change it, however, then just make sure you use this system to update the welcome email at the same time. Nice and easy!

UPDATE: Please make sure to chmod your languages/[language]/email_extras.php, languages/[language]/create_account.php and /languages/[language].php files (in both catalogue and admin) to be writable by apache if not this may not work.

Time Savers, Zen Cart ,

  1. Dan
    August 16th, 2008 at 05:53 | #1

    hello there,
    thanks for this mod.
    I’ve actually tried using it, got the editor in the admin section, but whenever I try to change/modify the email, and then click “update”, nothing gets modified.
    I did copy the file in the right folder, but the email is not being updated

    Any help will be appreciated :)

  2. August 16th, 2008 at 15:27 | #2

    Hi there, i’m glad you gave it a go. I shall look into the problem shortly for you and post an answer ASAP.

    I did write it a while ago for a client and it worked then so I have no idea why it shouldn’t do now. Can you contact me directly via email (barton.sean@gmail.com) and if you like I will have a look at it working (or not being the case) on your site, otherwise I can explain further what it is supposed to be doing and you can have a look at the code yourself (depending on your level of php understanding).

    Thanks
    Sean

  3. August 16th, 2008 at 15:41 | #3

    Hi Dan (again), I have just checked the script on my test server and it worked fine. Maybe there is a permissions issue or I accidentally hard coded a path somethere. Best contact me via email so I can have a look for you.

    Thanks
    Sean

  4. dan
    August 19th, 2008 at 06:23 | #4

    Hey sean,
    thx for your replies.
    I’ve sent you an email on your gmail account (it was in the readme.txt :) ).

    Thanks!
    Dan.

  5. October 9th, 2008 at 18:33 | #5

    I keep getting these errors when i try to add a new welcome message:

    Warning: copy(/home/signs/public_html/includes/languages/english/create_account_backup_091020081350.php) [function.copy]: failed to open stream: Permission denied in /home/signs/public_html/admin/email_welcome.php on line 210

    Warning: copy(/home/signs/public_html/includes/languages/english/email_extras_backup_091020081350.php) [function.copy]: failed to open stream: Permission denied in /home/signs/public_html/admin/email_welcome.php on line 210

    Warning: copy(includes/languages/english/email_extras_backup_091020081350.php) [function.copy]: failed to open stream: Permission denied in /home/signs/public_html/admin/email_welcome.php on line 210

    Warning: Cannot modify header information - headers already sent by (output started at /home/signs/public_html/admin/email_welcome.php:210) in /home/signs/public_html/admin/email_welcome.php on line 3

    I had about 30 of these errors but i got it down to 4 by changing permissions, I tried changing permissions on those files but no luck :(

  6. October 9th, 2008 at 19:32 | #6

    Hi Nathan, thanks for getting in touch.

    It’s been a while since I have looked at this bit of code but off the top of my head it still sounds like permission errors. What permissions did you set the files to? Also I think that the directory may need to have write permissions because the script creates a backup of your existing language file before overwriting.

    The last of your four errors is caused by a header redirect trying to occur so don’t worry about it. As soon as the other errors disappear, so it that one.

    Feel free to post on here but if you want a little more help then contact me via email at barton.sean[at]gmail.com

    thanks
    Sean

  7. Geoff
    November 19th, 2008 at 10:26 | #7

    I just installed this update and i get a page not found any idea?

  8. November 19th, 2008 at 10:29 | #8

    Hi Geoff, This page should just overwrite an existing page on your admin section. There are no redirects or anything in there which will cause it to error. What version of Zencart are you using? I write and tested this about 4-6 months ago so it might be a recent version conflict. Let me know the version and I will set up a test site and see if it works for you.

    thanks
    Sean

  9. December 20th, 2008 at 19:32 | #9

    Perfect! Thank you!

  1. No trackbacks yet.