Results 1 to 9 of 9
  1. #1
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,296
    Plugin Contributions
    22

    Default Problem & solution to additional customer status emails without customer info

    If you have a cart where the customer is required to have some sort of approval to browse, view prices or purchase, then when the customer status is updated a generic email goes out that says, "Hey you, your status has been updated." The email has no information in it about who the email is about.

    This is the fix for that - uploaded as a mod entitled "Customer Status Update Additional Emails" (just uploaded today) and the instructions here as well since it actually is very simple.

    Change the admin file - customers.php

    Find around line 79:
    if ((int)CUSTOMERS_APPROVAL_AUTHORIZATION > 0 && (int)$_POST['current'] > 0 && $custinfo->RecordCount() > 0) { [/PHP]

    replace this:
    PHP Code:
    $message EMAIL_CUSTOMER_STATUS_CHANGE_MESSAGE;
                  
    $html_msg['EMAIL_MESSAGE_HTML'] = EMAIL_CUSTOMER_STATUS_CHANGE_MESSAGE ;
                  
    zen_mail($custinfo->fields['customers_firstname'] . ' ' $custinfo->fields['customers_lastname'], $custinfo->fields['customers_email_address'], 

    EMAIL_CUSTOMER_STATUS_CHANGE_SUBJECT $message$extra_info['TEXT'], STORE_NAMEEMAIL_FROM$html_msg'default'); 
    with
    PHP Code:
    if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
          
    $extra_info=email_collect_extra_info('',''$this->customer['firstname'] . ' ' $this->customer['lastname'], $this->customer['email_address'], $this->customer

    ['telephone']);
          
    $html_msg['EXTRA_INFO'] = $extra_info['HTML'];
                  }
                    
                  
    $message EMAIL_CUSTOMER_STATUS_CHANGE_MESSAGE;
                  
    $html_msg['EMAIL_MESSAGE_HTML'] = EMAIL_CUSTOMER_STATUS_CHANGE_MESSAGE ;
                  
    zen_mail($custinfo->fields['customers_firstname'] . ' ' $custinfo->fields['customers_lastname'], $custinfo->fields['customers_email_address'], 

    EMAIL_CUSTOMER_STATUS_CHANGE_SUBJECT $message$extra_info['TEXT'], STORE_NAMEEMAIL_FROM$html_msg'default'); 
    The full-time Zen Cart Guru. WizTech4ZC.com

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Problem & solution to additional customer status emails without customer info

    Judging only from your post, I'm a bit confused: All it looks like is you're adding the office-use-only section to an email that's being sent out to the *customer*?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,296
    Plugin Contributions
    22

    Default Re: Problem & solution to additional customer status emails without customer info

    No, not to the customer. If you have additional emails turned on, the status update also goes out to whoever has been designated to receive the additional emails - I guess the create account emails. So the website owner wanted to know who the emails were going to. I gather he's not doing the approvals himself.
    The full-time Zen Cart Guru. WizTech4ZC.com

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Problem & solution to additional customer status emails without customer info

    But ... the code you posted is for the emails going to the customer, not the storeowner or "additional emails to" address:
    Code:
    zen_mail($custinfo->fields['customers_firstname'] . ' ' . $custinfo->fields['customers_lastname'],$custinfo->fields['customers_email_address'],
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,296
    Plugin Contributions
    22

    Default Re: Problem & solution to additional customer status emails without customer info

    Um, okay so I did get two emails but both were to me. One did come with the extra info and one didn't. But the extra info is listed up above as for the additional emails. That did go also to someone else - a real admin so I'll check to see if he got it. I got the impression that he did.
    The full-time Zen Cart Guru. WizTech4ZC.com

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Problem & solution to additional customer status emails without customer info

    No worries. Not nitpicking.
    Just wasn't sure about the ultimate intent since the code didn't look like it matched your description. :)
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,296
    Plugin Contributions
    22

    Default Re: Problem & solution to additional customer status emails without customer info

    Well, it's worse than that. I hope y'all didn't approve the mod. I definitely did get it to send out the emails but when the client went back in, it didn't work. He got a blank page when approving a customer. Error message:

    HTML Code:
    [09-Jul-2013 20:19:56] PHP Fatal error:  Using $this when not in object context in /home3/structx1/public_html/zenmin/customers.php on line 81
    which is this line
    PHP Code:
    if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
          
    $extra_info=email_collect_extra_info('',''$this->customer['firstname'] . ' ' $this->customer['lastname'], $this->customer['email_address'], $this->customer['telephone']); 
    I pulled that directly out of the orders class in the catalog where it adds the extra info in the footer of the email.

    So step one was incorrect. Immediately realized wrong query - not customer but cust_info in admin so changed to:
    PHP Code:
    if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
          
    $extra_info=email_collect_extra_info('',''$custinfo->fields['customers_firstname'] . ' ' $custinfo->fields['customers_lastname'], $custinfo->fields['customers_email_address'], $custinfo->fields['customer_telephone']);
          
    $html_msg['EXTRA_INFO'] = $extra_info['HTML']; 
    The info does show up on the admin's email now and I'm sure of that. So I can redo the mod. Looks like you have been holding it.
    The full-time Zen Cart Guru. WizTech4ZC.com

  8. #8
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,296
    Plugin Contributions
    22

    Default Re: Problem & solution to additional customer status emails without customer info

    Ah, this is not the situation I thought it was. Now I find out the admin customers file does not normally send out status emails to admin so nothing here is of any help whatsoever.
    DrByte - make sure the mod I uploaded does not go live please.
    The full-time Zen Cart Guru. WizTech4ZC.com

  9. #9
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Problem & solution to additional customer status emails without customer info

    Very well.

    I was a little confused about what you were trying to accomplish. :)
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v151 Product additional info by customer
    By perfumbg in forum General Questions
    Replies: 1
    Last Post: 25 Oct 2013, 07:37 AM
  2. v150 Order Status Options -- ALL options are sending emails & posting on customer view
    By lunabug in forum Managing Customers and Orders
    Replies: 7
    Last Post: 22 Jun 2012, 05:38 AM
  3. Status History & Comments (Customer & Admin side) Duplicate entries?
    By MaximumOverload in forum General Questions
    Replies: 3
    Last Post: 4 Apr 2011, 05:55 PM
  4. Order Status - Repeated Twice on Customer Emails
    By Beer_man in forum Managing Customers and Orders
    Replies: 5
    Last Post: 7 Jan 2007, 07:10 PM
  5. Need additional Customer Info
    By DesignbyDemeter in forum Managing Customers and Orders
    Replies: 1
    Last Post: 8 Jun 2006, 05:01 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR