Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Mar 2012
    Posts
    26
    Plugin Contributions
    0

    Default Order confirmation email editing

    Hello,
    I have seen several posts, tutorials and wiki entries on editing the order email but I cannot make it work.

    Here is what I need to do:
    Email to customer can stay as-is (HTML)
    Email to Admin needs to be plain text (and it is set to TEXT in the Configuration).

    I then need the order emails to the admin to look something like the following:

    Order Date: April 11, 2012 14:48:01
    first: Joe
    last: Blow
    addr1: 123 Any Street
    addr2: Apt 6A
    city: Honor
    etc.
    etc.

    But each time I try to add fields nothing changes (unless I forget a ; then it breaks) and the emails look exactly like the customer emails.

    I have read this: http://www.zen-cart.com/wiki/index.p...-mail_-_Format

    and this: https://www.zen-cart.com/tutorials/i...hp?article=113

    But no joy...

    My client has a system that takes the inbound emails, gathers the data and then if needed, emails out a download link and software key as some of their products are downloadable.

    I know this should be a snap but I have very little hair left after trying for days.

    Any ideas would be greatly appreciated.

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

    Default Re: Order confirmation email editing

    Quote Originally Posted by Daviator View Post
    But each time I try to add fields nothing changes (unless I forget a ; then it breaks) and the emails look exactly like the customer emails.
    Specifics about what exactly you're doing (ie: the part you say isn't working) would help us help you understand what you're doing incorrectly.
    .

    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
    Mar 2012
    Posts
    26
    Plugin Contributions
    0

    Default Re: Order confirmation email editing

    Sorry, should have been more specific... I've tried adding fields to the following section:

    Code:
      $this->products_ordered_attributes .= $custom_insertable_text;
    As an example I tried changing it to:

    Code:
    $this->products_ordered_attributes .= $EMAIL_FIRST_NAME;
    But nothing changes on my emails. I know enough about PHP to be dangerous. But I can usually copy, paste, move and comment out code. I.e. rearranged items on my product info page.

    Thanks again!

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

    Default Re: Order confirmation email editing

    Is the need here specifically to send out license keys?
    Or is there actually something more than that which needs to be accomplished?

    The license-key-generation-and-sending can be built-in so that there's no need to have an external system parse the info and send out keys.
    .

    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
    Mar 2012
    Posts
    26
    Plugin Contributions
    0

    Default Re: Order confirmation email editing

    I believe it's just to send out keys if need as some products are actual boxed CDs.

    I looked and didn't see a way (or plug-in) to send out keys automatically after a purchase so if you know if a way that would be awesome!

    Thanks!
    David

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

    Default Re: Order confirmation email editing

    For that you were indeed looking at the right section of code ... ie:
    Code:
        $this->notify('NOTIFY_ORDER_DURING_CREATE_ADD_PRODUCTS', $custom_insertable_text);
    
    /* START: ADD MY CUSTOM DETAILS
     * 1. calculate/prepare custom information to be added to this product entry in order-confirmation, perhaps as a function call to custom code to build a serial number etc:
     *   Possible parameters to pass to custom functions at this point:
     *     Product ID ordered (for this line item): $this->products[$i]['id']
     *     Quantity ordered (of this line-item): $this->products[$i]['qty']
     *     Order number: $zf_insert_id
     *     Attribute Option Name ID: (int)$this->products[$i]['attributes'][$j]['option_id']
     *     Attribute Option Value ID: (int)$this->products[$i]['attributes'][$j]['value_id']
     *     Attribute Filename: $attributes_values->fields['products_attributes_filename']
     *
     * 2. Add that data to the $this->products_ordered_attributes variable, using this sort of format:
     *      $this->products_ordered_attributes .=  {INSERT CUSTOM INFORMATION HERE};
     */
    
        $this->products_ordered_attributes .= $custom_insertable_text;
    
    /* END: ADD MY CUSTOM DETAILS */
    Specifically, you'll want to write an observer class to monitor the NOTIFY_ORDER_DURING_CREATE_ADD_PRODUCTS notifier and have it do the license key lookup and return the license code so it can be automatically inserted into the email along with the specific product's information.
    There are several forum threads discussing this, and maybe even some addons which use this and might serve as examples for you.
    .

    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
    Mar 2012
    Posts
    26
    Plugin Contributions
    0

    Default Re: Order confirmation email editing

    Hello DrByte,
    I'd be happy to write "an observer class to monitor the NOTIFY_ORDER_DURING_CREATE_ADD_PRODUCTS notifier and have it do the license key lookup and return the license code so it can be automatically inserted into the email along with the specific product's information." if I had a clue on how to do this. :)


    Thanks and I will browse the threads but last time I checked (a couple of weeks ago) not much was written on how to actually pull this off. Nor could I find a plugin that does it.

  8. #8
    Join Date
    Mar 2012
    Posts
    26
    Plugin Contributions
    0

    Default Re: Order confirmation email editing

    I see a few threads that say it's "possible" but most of them only link back to each other as a reference and none mention how to actually do it. A search of free and commercial plugins was fruitless.

    Hence my original question on how to edit the inbound emails for my clients existing systems.

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

    Default Re: Order confirmation email editing

    When I searched the Addons section for "software" I found this one which bills itself as somewhat related to what you're talking about, albeit was written for an older ZC version: http://www.zen-cart.com/index.php?ma...oducts_id=1301
    .

    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.

  10. #10
    Join Date
    Mar 2012
    Posts
    26
    Plugin Contributions
    0

    Default Re: Order confirmation email editing

    I tried it on a test site and it's not working with zencart 1.5. Therefore I'd like to go back to my original post and see if anyone has an idea as to why the added fields are not appearing.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Editing email confirmation .
    By Steeveef in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 24 Jun 2010, 05:11 PM
  2. Editing Order Confirmation Email
    By JGiacchi in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 2 Mar 2009, 11:16 PM
  3. Editing order confirmation email
    By KTNaturals in forum General Questions
    Replies: 6
    Last Post: 10 Feb 2008, 04:57 AM
  4. Editing The Layout Of The Order Confirmation Email
    By steve_ringuk in forum General Questions
    Replies: 1
    Last Post: 7 Feb 2008, 05:23 PM
  5. Editing email order confirmation
    By chronister in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 30 Nov 2007, 03:43 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