Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jul 2023
    Location
    Idaho
    Posts
    7
    Plugin Contributions
    0

    Default Email Order Confirmation has 2 missing definition variables for Phone/Email

    I noticed that email confirmations are showing the following 2 variables:
    Click image for larger version. 

Name:	email_issue.png 
Views:	180 
Size:	8.5 KB 
ID:	20335

    Delivery Address
    $EMAIL_TEXT_TELEPHONE and $EMAIL_CUSTOMER_PHONE

    I've checked throughout the codebase and I can't seem to find where to modify those variables? I've inserted define('EMAIL_TEXT_TELEPHONE', 'Telephone: '); into line 38 of email_extras.php with no successful outcome to the confirmation email. Any ideas?

    - Idaho Eagle

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,976
    Plugin Contributions
    96

    Default Re: Email Order Confirmation has 2 missing definition variables for Phone/Email

    Welcome to the community!

    What version of Zen Cart is being used? Those html-email values are provided by /includes/classes/order.php when it's creating the order-confirmation email.

    It sounds like (??) you've got a template-override version of the language file, e.g. /includes/languages/english/YOUR_TEMPLATE/email_extras.php, that doesn't include that language constant.

  3. #3
    Join Date
    Jul 2023
    Location
    Idaho
    Posts
    7
    Plugin Contributions
    0

    Default Re: Email Order Confirmation has 2 missing definition variables for Phone/Email

    Quote Originally Posted by lat9 View Post
    Welcome to the community!

    What version of Zen Cart is being used? Those html-email values are provided by /includes/classes/order.php when it's creating the order-confirmation email.

    It sounds like (??) you've got a template-override version of the language file, e.g. /includes/languages/english/YOUR_TEMPLATE/email_extras.php, that doesn't include that language constant.

    The version we are using is v1.5.7c. When I navigate to the path: /includes/languages/english .... I don't see a template-override version, unless I am missing something? Here is what I see:
    Click image for larger version. 

Name:	path.jpg 
Views:	44 
Size:	48.8 KB 
ID:	20337

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,976
    Plugin Contributions
    96

    Default Re: Email Order Confirmation has 2 missing definition variables for Phone/Email

    The /includes/classes/order.php from zc157c does include those fields in the email, present in the send_order_email method:
    Code:
      function send_order_email($zf_insert_id = null, $zf_mode = FALSE) {
        global $currencies, $order_totals;
    
        if ($zf_insert_id === null) $zf_insert_id = $this->orderId;
    
        $this->notify('NOTIFY_ORDER_SEND_EMAIL_INITIALIZE', array(), $zf_insert_id, $order_totals, $zf_mode);
        if (!defined('ORDER_EMAIL_DATE_FORMAT')) define('ORDER_EMAIL_DATE_FORMAT', 'M-d-Y h:iA');
    
        $this->send_low_stock_emails = TRUE;
        $this->notify('NOTIFY_ORDER_SEND_LOW_STOCK_EMAILS');
        if ($this->send_low_stock_emails && $this->email_low_stock != ''  && SEND_LOWSTOCK_EMAIL=='1') {
          $email_low_stock = SEND_EXTRA_LOW_STOCK_EMAIL_TITLE . "\n\n" . $this->email_low_stock;
          zen_mail('', SEND_EXTRA_LOW_STOCK_EMAILS_TO, EMAIL_TEXT_SUBJECT_LOWSTOCK, $email_low_stock, STORE_OWNER, EMAIL_FROM, array('EMAIL_MESSAGE_HTML' => nl2br($email_low_stock)),'low_stock');
        }
    
        // lets start with the email confirmation
        // make an array to store the html version
        $html_msg=array();
    
        //intro area
        $email_order = EMAIL_TEXT_HEADER . EMAIL_TEXT_FROM . STORE_NAME . "\n\n" .
        $this->customer['firstname'] . ' ' . $this->customer['lastname'] . "\n\n" .
        EMAIL_THANKS_FOR_SHOPPING . "\n" . EMAIL_DETAILS_FOLLOW . "\n" .
        EMAIL_SEPARATOR . "\n" .
        EMAIL_TEXT_ORDER_NUMBER . ' ' . $zf_insert_id . "\n" .
        EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n" .
        EMAIL_TEXT_INVOICE_URL . ' ' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false) . "\n\n";
    
        $html_msg['EMAIL_TEXT_HEADER']     = EMAIL_TEXT_HEADER;
        $html_msg['EMAIL_TEXT_FROM']       = EMAIL_TEXT_FROM;
        $html_msg['INTRO_STORE_NAME']      = STORE_NAME;
        $html_msg['EMAIL_THANKS_FOR_SHOPPING'] = EMAIL_THANKS_FOR_SHOPPING;
        $html_msg['EMAIL_DETAILS_FOLLOW']  = EMAIL_DETAILS_FOLLOW;
        $html_msg['INTRO_ORDER_NUM_TITLE'] = EMAIL_TEXT_ORDER_NUMBER;
        $html_msg['INTRO_ORDER_NUMBER']    = $zf_insert_id;
        $html_msg['INTRO_DATE_TITLE']      = EMAIL_TEXT_DATE_ORDERED;
        $html_msg['INTRO_DATE_ORDERED']    = strftime(DATE_FORMAT_LONG);
        $html_msg['INTRO_URL_TEXT']        = EMAIL_TEXT_INVOICE_URL_CLICK;
        $html_msg['INTRO_URL_VALUE']       = zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false);
        $html_msg['EMAIL_CUSTOMER_PHONE']  = $this->customer['telephone'];
        $html_msg['EMAIL_ORDER_DATE']      = date(ORDER_EMAIL_DATE_FORMAT);
        $html_msg['EMAIL_TEXT_TELEPHONE']  = EMAIL_TEXT_TELEPHONE;
    
        $invoiceInfo = EMAIL_TEXT_INVOICE_URL . ' ' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false) . "\n\n";
        $htmlInvoiceURL = EMAIL_TEXT_INVOICE_URL_CLICK;
        $htmlInvoiceValue = zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false);
    I'm guessing that your issue has something to do with that "Quick Checkout" plugin that you've got installed; it most likely hasn't been updated to recognize that those fields are present (they've been there since Zen Cart 1.5.5f).

    If you're set on using that problematic plugin, your quickest path to success is simply to update your store's version of /email/email_template_checkout.html, changing this section:
    Code:
          <tr>
            <td class="address">$ADDRESS_DELIVERY_DETAIL<br>
            $EMAIL_TEXT_TELEPHONE $EMAIL_CUSTOMER_PHONE</td>
          </tr>
    to read
    Code:
          <tr>
            <td class="address">$ADDRESS_DELIVERY_DETAIL</td>
          </tr>
    ... essentially, removing those email variables that the "Quick Checkout" doesn't 'know from'.

  5. #5
    Join Date
    Jul 2023
    Location
    Idaho
    Posts
    7
    Plugin Contributions
    0

    Default Re: Email Order Confirmation has 2 missing definition variables for Phone/Email

    Odd. My order.php file does not include those fields?
    Click image for larger version. 

Name:	fields.jpg 
Views:	37 
Size:	43.6 KB 
ID:	20338

  6. #6
    Join Date
    Jul 2023
    Location
    Idaho
    Posts
    7
    Plugin Contributions
    0

    Default Re: Email Order Confirmation has 2 missing definition variables for Phone/Email

    Also, the only plugin I see installed is this one:

    Click image for larger version. 

Name:	plugins.jpg 
Views:	35 
Size:	9.6 KB 
ID:	20339

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,976
    Plugin Contributions
    96

    Default Re: Email Order Confirmation has 2 missing definition variables for Phone/Email

    Right, that "Quick Checkout" isn't an encapsulated plugin that shows in Modules :: Plugin Manager, it's an older one that requires copying files, updating the database and (most likely) overwriting core Zen Cart files.

    You'll see (IIRC) its settings in additions to your site's admin's Configuration menu dropdown. I saw that from the presence of /includes/languages/english/quick_checkout.php.

  8. #8
    Join Date
    Jul 2023
    Location
    Idaho
    Posts
    7
    Plugin Contributions
    0

    Default Re: Email Order Confirmation has 2 missing definition variables for Phone/Email

    Removing those variables in the email_template_checkout.html file worked to get rid of those variables out of the confirmation email. Thank you. I do see another variable $EMAIL_ORDER_MESSAGE in the same file. I'm sure removing that variable will also remove it from the confirmation email. Saying that, I'm not familiar with the "Quick Checkout" plugin that you say we have installed. I would rather not use that plugin, and wondering if you can help me figure out how to get the customer phone on the email confirmation sent out, as well as the $Email_Order_Message (not sure where to find this message at and what it is supposed to say).

    Click image for larger version. 

Name:	email order.png 
Views:	32 
Size:	11.6 KB 
ID:	20340

  9. #9
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,976
    Plugin Contributions
    96

    Default Re: Email Order Confirmation has 2 missing definition variables for Phone/Email

    As mentioned before, there's most likely some admin Configuration settings associated with either Quick Checkout or Fast and Easy Checkout. Disabling those might do the trick.

  10. #10
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,723
    Plugin Contributions
    13

    Default Re: Email Order Confirmation has 2 missing definition variables for Phone/Email

    This is one of the times when Mod List is helpful. Installing it will show you where these items are lurking both in the files and the database. It's especially helpful with FEC. It will show you the configuration keys that need to be gone from the configuration table.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. phone no and email address in order confirmation mail
    By saroja in forum PayPal Website Payments Pro support
    Replies: 0
    Last Post: 23 Nov 2011, 08:46 AM
  2. missing order confirmation email
    By eaglewu in forum General Questions
    Replies: 0
    Last Post: 28 Aug 2010, 05:01 PM
  3. Order Confirmation email missing customer address?
    By azwli in forum General Questions
    Replies: 19
    Last Post: 6 Nov 2009, 06:58 AM
  4. Replies: 4
    Last Post: 9 Jun 2009, 08:17 PM
  5. Email order confirmation has wrong date format
    By oavs in forum General Questions
    Replies: 0
    Last Post: 22 Aug 2008, 10:21 AM

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