Jump to content

fharos

Members
  • Content count

    9
  • Joined

  • Last visited

Everything posted by fharos

  1. Ok thanks. In fact i just want to have the name and the lastname in mailbeez_tracking TABLE for person who received a birthday email. I think i have to do a modification in mailbeez_mailer.php (line 90 // TABLE_MAILBEEZ_TRACKING) but i don't know where exactly. If anyone have an idea ! Fharos (Viva espagna !!!)
  2. Hi Mailbeez, Everything works fine now. Just another question. In my Database i've found a mailbeeztracking Table. I've created 3 more rows (customers_dob, customers_firstname and customers_lastname) My question is : how can I input customers dob, lastname and firstname in it in order to have statistics ? Thx
  3. Yes I have Google Analytics. Do I enter the tracking code in the mail?
  4. Hi Mailbeez ! I finally managed to put up my voucher system. Thanks to your explanation with fantomas. Thank you very much. However, I have another question now : is there a way to place a monitoring of these emails? Know who purchased ? Advance thank you
  5. After a check it's appear tha the $dob appearring only in the liste of customers !!! Think the code in birthday.php is not in the right place. still searching
  6. Thxs mailbeez, I better understand the system with you now. Unfortunately, even using it, it does not work. $dob is appearing in the mail like this : "$dob" !! I put my code below. function getAudience() { global $languages_id; $query_raw = "select c.customers_firstname, c.customers_lastname, c.customers_id, c.customers_email_address, c.customers_dob, date_format(c.customers_dob, '%d.%m.') as date_of_birth from " . TABLE_CUSTOMERS . " c where date_format(c.customers_dob,'%m%d') < ( date_format(now(),'%m%d')+ " . MAILBEEZ_BIRTHDAY_BEFORE_DAYS . ") and date_format(c.customers_dob,'%m%d') > ( date_format(now(),'%m%d')- ". MAILBEEZ_BIRTHDAY_PASSED_DAYS_SKIP . ")"; $query = mh_db_query($query_raw); // for early check $mb_chk = new mailbeez_mailer($this); while ($item = mh_db_fetch_array($query)) { // mandatory fields: // - firstname // - lastname // - email_address // - customers-id -> block // other keys are replaced while sending: $<key> // early check to avoid processing when email was already sent $chk_result = $mb_chk->check($this->module, $this->iteration, $item['customers_id']); if ($chk_result != false) { // this iteration for this customer was already sent -> skip continue; } $this->audience[$item['customers_id']] = array('firstname' => $item['customers_firstname'], 'lastname' => $item['customers_lastname'], 'email_address' => $item['customers_email_address'], 'customers_id' => $item['customers_id'], 'date_of_birth' => $item['date_of_birth'], 'dob' => fharos_is_cool() ); } return $this->audience; } After I lower my arms! Thxs a lot for the help Fharos
  7. THXS, I think i'm stupid (off course i'm french ;-) ) It doesn't work. I'm a beginner in php development. I've a php file named : coupon_dob.php placed in : catalog/mailhive/mailbeez/email This file contain a little part of code like this : <?php $jour = date('j'); $mois = date('m'); // if ($jour == 22 && $mois == 06) { $dob = "France will not win the Fifa World Cup......."; } else { $dob = "Off course not !"; } ?> And my birthday.php file contains this : <?php /* MailBeez Automatic Trigger Email Campaigns http://www.mailbeez.com Copyright (c) 2010 MailBeez inspired and in parts based on Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // make path work from admin require_once(DIR_FS_CATALOG. 'mailhive/common/classes/mailbeez.php'); // could be in language-file // just easier to define it in the mailbee define('MAILBEEZ_BIRTHDAY_TEXT_TITLE', 'Birthday Greetings'); define('MAILBEEZ_BIRTHDAY_TEXT_DESCRIPTION', 'Be nice and remember the Birthday of your customers - this MailBeez Module sends birthday greetings.'); class birthday extends mailbeez { // class constructor function birthday() { // call constructor mailbeez::mailbeez(); // set some stuff: $this->code = 'birthday'; $this->module = 'birthday'; $this->version = '1.1'; // float value $this->iteration = date('Y'); // year $this->title = MAILBEEZ_BIRTHDAY_TEXT_TITLE; $this->description = MAILBEEZ_BIRTHDAY_TEXT_DESCRIPTION; $this->sort_order = MAILBEEZ_BIRTHDAY_SORT_ORDER; $this->enabled = ((MAILBEEZ_BIRTHDAY_STATUS == 'True') ? true : false); $this->sender = MAILBEEZ_BIRTHDAY_SENDER; $this->sender_name = MAILBEEZ_BIRTHDAY_SENDER_NAME; $this->status_key = 'MAILBEEZ_BIRTHDAY_STATUS'; $this->documentation_key = $this->module; // leave empty if no documentation available // $this->documentation_root = 'http:://yoursite.com/' // modify documentation root if necessary $this->htmlBodyTemplateResource = 'body_html.tpl'; // located in folder of this module $this->txtBodyTemplateResource = 'body_txt.tpl'; // located in folder of this module $this->subjectTemplateResource = 'subject.tpl'; // located in folder of this module $this->audience = array(); $this->additionalFields = array('customers_id' => '007','date_of_birth' => '31.01.'); // list of additional fields to show in listing with testvalues // list of additional fields to show in listing with testvalues used for Test-Mail } // class methods function getAudience() { global $languages_id; $query_raw = "select c.customers_firstname, c.customers_lastname, c.customers_id, c.customers_email_address, c.customers_dob, date_format(c.customers_dob, '%d.%m.') as date_of_birth from " . TABLE_CUSTOMERS . " c where date_format(c.customers_dob,'%m%d') < ( date_format(now(),'%m%d')+ " . MAILBEEZ_BIRTHDAY_BEFORE_DAYS . ") and date_format(c.customers_dob,'%m%d') > ( date_format(now(),'%m%d')- ". MAILBEEZ_BIRTHDAY_PASSED_DAYS_SKIP . ")"; $query = mh_db_query($query_raw); // for early check $mb_chk = new mailbeez_mailer($this); while ($item = mh_db_fetch_array($query)) { // mandatory fields: // - firstname // - lastname // - email_address // - customers-id -> block // other keys are replaced while sending: $<key> // early check to avoid processing when email was already sent $chk_result = $mb_chk->check($this->module, $this->iteration, $item['customers_id']); if ($chk_result != false) { // this iteration for this customer was already sent -> skip continue; } $this->audience[$item['customers_id']] = array('firstname' => $item['customers_firstname'], 'lastname' => $item['customers_lastname'], 'email_address' => $item['customers_email_address'], 'customers_id' => $item['customers_id'], 'date_of_birth' => $item['date_of_birth'] ); } return $this->audience; } // installation methods function keys() { return array('MAILBEEZ_BIRTHDAY_STATUS', 'MAILBEEZ_BIRTHDAY_BEFORE_DAYS', 'MAILBEEZ_BIRTHDAY_PASSED_DAYS_SKIP', 'MAILBEEZ_BIRTHDAY_SENDER', 'MAILBEEZ_BIRTHDAY_SENDER_NAME', 'MAILBEEZ_BIRTHDAY_SORT_ORDER'); } function install() { mh_insert_config_value(array('configuration_title' => 'Send birthday reminder', 'configuration_key' => 'MAILBEEZ_BIRTHDAY_STATUS', 'configuration_value' => 'False', 'configuration_description' => 'Do you want to send birthday emails?', 'set_function' => 'mh_cfg_select_option(array(\'True\', \'False\'), ' )); mh_insert_config_value(array('configuration_title' => 'Set days before', 'configuration_key' => 'MAILBEEZ_BIRTHDAY_BEFORE_DAYS', 'configuration_value' => '1', 'configuration_description' => 'number of days before birthday sending the emails', 'set_function' => '' )); mh_insert_config_value(array('configuration_title' => 'Set days to skip after', 'configuration_key' => 'MAILBEEZ_BIRTHDAY_PASSED_DAYS_SKIP', 'configuration_value' => '2', 'configuration_description' => 'number of days after which do skip the birthday email (in case cron job failed)', 'set_function' => '' )); mh_insert_config_value(array('configuration_title' => 'sender email', 'configuration_key' => 'MAILBEEZ_BIRTHDAY_SENDER', 'configuration_value' => STORE_OWNER_EMAIL_ADDRESS, 'configuration_description' => 'sender email', 'set_function' => '' )); mh_insert_config_value(array('configuration_title' => 'sender name', 'configuration_key' => 'MAILBEEZ_BIRTHDAY_SENDER_NAME', 'configuration_value' => STORE_NAME, 'configuration_description' => 'sender email', 'set_function' => '' )); mh_insert_config_value(array('configuration_title' => 'Sort order of display.', 'configuration_key' => 'MAILBEEZ_BIRTHDAY_SORT_ORDER', 'configuration_value' => '20', 'configuration_description' => 'Sort order of display. Lowest is displayed first.', 'set_function' => '' )); } } ?> When i sending my birthday mail, i want to insert the $dob value (it will be a 5 items code) in this mail in order to offer a reduction to my client Your method is quiet to difficult for me ! lol And don't forget i'm french ........ ;-)
  8. Hi Mailbeez, Congratulations for your great work ! I've a little problem : i just want to insert some php in the birthday mail and i do not know how to do. I've read some stuff on the web but nothing can help me. I've a php file with php and i want to call him in the tpl. Thxs for help Fharos
×