Results 1 to 8 of 8

How to access and edit Welcome and Order emails?

This is a discussion on How to access and edit Welcome and Order emails? within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; I am using OSCMax 2.0 It has been modded with the 'Purchase Without Account' option I dont think it has ...

      
  1. #1
    New Member
    Join Date
    Nov 2005
    Posts
    6
    Rep Power
    0


    Default How to access and edit Welcome and Order emails?

    I am using OSCMax 2.0

    It has been modded with the 'Purchase Without Account' option

    I dont think it has been patched. It was downloaded around 11/6/2005

    The URL is www.digitalcheap.com

    Problem 1:

    It seems that emails are not being sent to the customer after they place an order.

    They get the Welcome email when they create an account.

    Below is the partial code relating to sending out email, from the catalog/checkout_process.php page


    ------ Start Code --------------------------------------------------------------


    // lets start with the email confirmation
    // LINE ADDED: PWA - Add test for PWA - no display of invoice URL if PWA customer
    if (!tep_session_is_registered('noaccount')) {
    $email_order = STORE_NAME . "\n" .
    EMAIL_SEPARATOR . "\n" .
    EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
    EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .
    EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
    if ($order->info['comments']) {
    $email_order .= tep_db_output($order->info['comments']) . "\n\n";
    }
    $email_order .= EMAIL_TEXT_PRODUCTS . "\n" .
    EMAIL_SEPARATOR . "\n" .
    $products_ordered .
    EMAIL_SEPARATOR . "\n";
    } else {
    $email_order = STORE_NAME . "\n" .
    EMAIL_SEPARATOR . "\n" .
    EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
    EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
    if ($order->info['comments']) {
    $email_order .= tep_db_output($order->info['comments']) . "\n\n";
    }
    $email_order .= EMAIL_TEXT_PRODUCTS . "\n" .
    EMAIL_SEPARATOR . "\n" .
    $products_ordered .
    EMAIL_SEPARATOR . "\n";
    }

    for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
    $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
    }

    if ($order->content_type != 'virtual') {
    $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .
    EMAIL_SEPARATOR . "\n" .
    tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
    }

    $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
    EMAIL_SEPARATOR . "\n" .
    tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
    if (is_object($$payment)) {
    $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .
    EMAIL_SEPARATOR . "\n";
    $payment_class = $$payment;
    $email_order .= $payment_class->title . "\n\n";
    if ($payment_class->email_footer) {
    $email_order .= $payment_class->email_footer . "\n\n";
    }
    }
    tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

    // send emails to other people
    if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
    tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
    }


    ----- End Code -------------------------------------------------------------



    Problem 2:

    How do I access the Welcome and New Order Email content so I can edit them?

  2. #2
    osCMax Development Team
    Join Date
    Nov 2002
    Location
    Orlando
    Posts
    433
    Rep Power
    14


    Default RE: How to access and edit Welcome and Order emails?

    I don't know why it's not sending the order emails but I have the answer for Problem 2.

    Edit welcome emails in admin/includes/languages/english/create_account_process.php

    Edit order emails depending on what you are looking to edit /includes/languages/english/checkout_process.php
    John

  3. #3
    Member
    Join Date
    Feb 2006
    Posts
    63
    Rep Power
    0


    Default RE: How to access and edit Welcome and Order emails?

    That location does not make alot of sense since it does not hold any of the data that is used to generate the email and its content, it merely defines which fields should be in the email itself.

    In oscommerce I could edit the order email, but for some reason in OSCMAX I have not yet been able to locate the actual file with the email content in it.

  4. #4
    osCMax Development Team
    Join Date
    Nov 2002
    Location
    Orlando
    Posts
    433
    Rep Power
    14


    Default RE: How to access and edit Welcome and Order emails?

    Are you telling me that the information is not there or that you don't think it shoud be there? In other words did you look?
    John

  5. #5
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,501
    Rep Power
    567


    Default Re: RE: How to access and edit Welcome and Order emails?

    Quote Originally Posted by JohnW
    Edit welcome emails in admin/includes/languages/english/create_account_process.php

    Edit order emails depending on what you are looking to edit /includes/languages/english/checkout_process.php
    John is correct. The email text is edited in the exact files that he specified...
    Michael Sasek
    osCMax Developer


    osCmax installation service - Have our professionals install osCmax on your server - same day service!
    osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0

    Stay Up To Date with everything osCMax:
    Free osCMax Newsletters - Security notices, New Releases, osCMax News
    osCMax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  6. #6
    Member
    Join Date
    Feb 2006
    Posts
    63
    Rep Power
    0


    Default RE: Re: RE: How to access and edit Welcome and Order emails?

    languages/english/checkout_process contains the following information?

    <?php
    /*
    $Id: checkout_process.php,v 1.1.1.1.2.1.2.2 2005/09/21 20:57:22 Michael Sasek Exp $

    osCMax Power E-Commerce
    http://oscdox.com

    Copyright (c) 2005 osCMax, 2002 osCommerce

    Released under the GNU General Public License
    */

    define('EMAIL_TEXT_SUBJECT', 'Order Process');
    define('EMAIL_TEXT_ORDER_NUMBER', 'Order Number:');
    define('EMAIL_TEXT_INVOICE_URL', 'Detailed Invoice:');
    define('EMAIL_TEXT_DATE_ORDERED', 'Date Ordered:');
    define('EMAIL_TEXT_PRODUCTS', 'Products');
    define('EMAIL_TEXT_SUBTOTAL', 'Sub-Total:');
    define('EMAIL_TEXT_TAX', 'Tax: ');
    define('EMAIL_TEXT_SHIPPING', 'Shipping: ');
    define('EMAIL_TEXT_TOTAL', 'Total: ');
    define('EMAIL_TEXT_DELIVERY_ADDRESS', 'Delivery Address');
    define('EMAIL_TEXT_BILLING_ADDRESS', 'Billing Address');
    define('EMAIL_TEXT_PAYMENT_METHOD', 'Payment Method');

    define('EMAIL_SEPARATOR', '------------------------------------------------------');
    define('TEXT_EMAIL_VIA', 'via');
    ?>

    So what am I missing here, nothing here will allow me to alter what is displayed in the email.? or am I being a plank? (likely)

  7. #7
    Member
    Join Date
    Feb 2006
    Posts
    63
    Rep Power
    0


    Default RE: Re: RE: How to access and edit Welcome and Order emails?

    I actually need to be able to remove all prices from being displayed in the order email sent to clients, but have no idea how to. Can anyone help me with that side of it at all?

  8. #8
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,501
    Rep Power
    567


    Default RE: Re: RE: How to access and edit Welcome and Order emails?

    For the structure you need to edit /catalog/checkout_process.php and/or checkout_success.php

    For the text, also see /includes/languages/english/checkout_success.php

    You know, all you need is a text editor that can search across files, then search for a text string in the email. This way you never, ever, EVER, have to wait for someone to do this exact thing for you...

    I know people think I am like rainman and know every single osCMax constant, but my secret is UltraEdit and its neato 'Find in Files' feature. It just searches through EVERY file in osCMax, and tells me what files that search string is in. I highly recommend it.
    Michael Sasek
    osCMax Developer


    osCmax installation service - Have our professionals install osCmax on your server - same day service!
    osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0

    Stay Up To Date with everything osCMax:
    Free osCMax Newsletters - Security notices, New Releases, osCMax News
    osCMax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

Similar Threads

  1. edit order when order is pending
    By chitta_rn in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 01-14-2006, 08:41 AM
  2. Modifying Emails -- Update Order Status
    By pgowder in forum osCommerce 2.2 Modification Help
    Replies: 5
    Last Post: 07-16-2005, 03:37 AM
  3. Disable order emails to customer?
    By Rich2005 in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 06-13-2005, 08:15 AM
  4. Order emails
    By cigarjoe2003 in forum osCMax v1.7 Installation
    Replies: 2
    Last Post: 11-25-2004, 12:03 AM
  5. Language of the dates in order edit emails?
    By Lynoure in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 01-18-2004, 09:15 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
  •