Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Feb 2009
    Location
    Sydney, Australia
    Posts
    44
    Plugin Contributions
    0

    Default Email notification if a customer makes a change to their details?

    Is there any way to be notified by email when a customer makes a change to any of their contact or address details?

    I am currently running two databases one for offline sales an one for online (obviously zencart) I am not yet ready to move the offline database online so I would like to be notified about any contact detail changes made by my customers online.

    Thanks

    Sam

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,655
    Plugin Contributions
    25

    Default Re: Email notification if a customer makes a change to their details?

    This facility doesn't exist in Zen Cart's core code so you would need to build it. There is a zen_mail function that would make this easier than it might otherwise be, so the tricky bit would be detecting the changes.

    A better approach might be to develop reports that run daily or weekly and return any changes to the customer or address_book tables, as these are date stamped each time there's a change.

    Both of these options though would require some programming skills and a fairly good kowledge of the innards of Zen Cart.
    See and test drive Zen Cart's free templates at zencarttemplates.info

    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Feb 2009
    Location
    Sydney, Australia
    Posts
    44
    Plugin Contributions
    0

    Default Re: Email notification if a customer makes a change to their details?

    Thanks kuroi,

    Where would I start? I am a beginner at php but slowly getting my head around it..

    I was thinking something simple like:

    Code:
    $email_message = 'Address change:' . "\n\n";
    $email_message .= 'Customer ID:' . $customer_id . "\n";
    $email_message .= 'Customer:' . $customers_firstname . ' ' . $lastname . "\n";
    
      tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, 'Address change', $email_message, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
    I tried putting it under this line:
    Code:
    <?php if ($messageStack->size('addressbook') > 0) echo $messageStack->output('addressbook'); ?>
    in address_book_process.php but doesn't seem to work, any suggestions?

    Thanks Sam

  4. #4
    Join Date
    Feb 2009
    Location
    Sydney, Australia
    Posts
    44
    Plugin Contributions
    0

    Default Re: Email notification if a customer makes a change to their details?

    Does anyone know of a good place to start, either to have an email notification or daily report of customer details changes?

    Thanks

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,726
    Plugin Contributions
    6

    Default Re: Email notification if a customer makes a change to their details?

    NOTE: tep_ is a prefix for osC and not for Zen Cart ...

    If you look in the /includes/modules/pages/account_edit/header_php.php you will see where updates are made that indicate a change has happened to the account around the lines:
    Code:
        $sql = "UPDATE " . TABLE_CUSTOMERS_INFO . "
                SET    customers_info_date_account_last_modified = now()
                WHERE  customers_info_id = :customersID";
    
        $sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
    
        $db->Execute($sql);
    You could add your email code after that ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  6. #6
    Join Date
    Feb 2009
    Location
    Sydney, Australia
    Posts
    44
    Plugin Contributions
    0

    Default Re: Email notification if a customer makes a change to their details?

    Thanks for your reply,

    now sure exactly how to use the zen_mail command,

    would the script be:

    Code:
    $email_message .= 'Customer:' . $customers_firstname . ' ' . $customers_lastname . "\n";
    
      zen_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, 'Address change', $email_message, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
    or even easier:

    Code:
    $email_message .= 'Customer:' . $customers_firstname . ' ' . $customers_lastname . "\n";
    
       zen_mail( "samueljohnstone####################", "$email_message");
    Thanks so much for your help. I'm a little bit lost here. If you could give me an example of the code already in zen cart that would help heaps.

    Thanks

    Sam


 

 

Similar Threads

  1. Replies: 2
    Last Post: 7 Aug 2008, 07:07 AM
  2. Sending customer login details with Welcome email
    By finestimaginary in forum General Questions
    Replies: 4
    Last Post: 10 Jun 2008, 02:26 PM
  3. Order Notification Email Change Format?
    By adolgin in forum Managing Customers and Orders
    Replies: 5
    Last Post: 26 Sep 2007, 01:51 PM
  4. New customer email notification
    By mpence in forum General Questions
    Replies: 4
    Last Post: 13 Jun 2007, 04:52 PM
  5. How to change my web URL on the email notification
    By redge in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 8 Oct 2006, 09:36 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •