Zen Cart Logo
Forums / General Questions / zen_mail() function (what includes?) and splitting newsletter signup to languagegroup

zen_mail() function (what includes?) and splitting newsletter signup to languagegroup

Views: 756

Results 1 to 3 of 3
9 Mar 2011, 12:37 PM
#1
rauli avatar

rauli

New Zenner

Join Date:
Feb 2011
Posts:
2
Plugin Contributions:
0

zen_mail() function (what includes?) and splitting newsletter signup to languagegroup

Hi All,

I experimented with the zen_mail() method using a require() to import the email_functions.php but never got it to send and could not get it to provide verbose output as to why not or any other logging either.

I also tried to use a regular php mail() which worked and then queue after it log into the email archiving using the archiving function in the same email functions.php file when it told me the string sanitizing function was not defined indicating it was elsewhere in another .php file of general_functions.php but after using require() for that also got an "illegal access" message.

I prefer to use the zen_mail() method to allow logging the free e-books link sent to people for customer/usage statistics purposes.

It seems the functions libraries usage for zen cart are not as superficial/obvious as i hoped and the documentation for the zen_mail() as hard I look is lacking - does the zen cart manual available for sale have detail documentation on its usage?

All I need to know is what files I have to import to invoke and use the zen_mail() function successfully.

Also, I want to alter the newsletter (and/or newsletter subscribe contribution that I have installed) method signup to look for the language url variable and add that persons e-mail to a newsletter subscription group based on language which currently is german or english. Should this be fairly easy to do?

I figured I could do this by copying the module I want to alter in the pages folder into another folder (e.g. subscribe) with another name (e.g. subscribeDE) then change the main_page=subscribe action URL based on a $_GET for the language variable into main_page=subscribeDE for german and main_page=subscribeEN for english but am worried it will orphan the modified function in the copied module folder from its includes or otherwise not work because its folder has another name.

The website I am developing is at http://www.rohtopia.com/prototype/rohtopia.com if you need to look.

Realise I am new to web design - I am smart but don't know a lot and all the work I done so far is self taught.

I read there is some sort of auto include method in zen cart but could not understand when reading about it.

Thanks,
Rauli

9 Mar 2011, 2:09 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: zen_mail() function (what includes?) and splitting newsletter signup to languagegroup

zen_mail() will work without any special include/require statements as long as you're running it from inside a Zen Cart page. If you're running it from a script that's not part of Zen Cart, then you're going to have problems.

24 Mar 2011, 5:54 AM
#3
rauli avatar

rauli

New Zenner

Join Date:
Feb 2011
Posts:
2
Plugin Contributions:
0

Re: zen_mail() function (what includes?) and splitting newsletter signup to languagegroup

Thank you for the reply. Does the Zen Cart manual have detailed documentation about its functions to help me use them effectively and avoid silly mistakes like what I did here?

Thanks,
Rauli