Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2010
    Location
    Canada, Winnipeg
    Posts
    15
    Plugin Contributions
    0

    Default How to add a field to the Confirmation Email?

    ZenCart Confirmation Email.
    I am trying to add a line to the email sent out for order confirmation.
    I made the following changes.
    I should see "This is your Ticket", but all I see is "EMAIL_TICKET_1"
    The email works fine, but does not find the proper text.
    What am I doing wrong?

    email/email_template_checkout.html
    added at end of CSS:
    .ticket {background-color:#FF6600; border:1px #9a9a9a; width:542px; height:200px; padding:2px; font-size:10px; }
    added at end of HTML:
    <div class="ticket">$EMAIL_TICKET_1</div>

    includes/languages/english/checkout_process.php
    added after line 42:
    define('EMAIL_TICKET_1', 'This is your ticket');

    admin/orders.php
    added after line 124:
    $html_msg['EMAIL_TICKET_1'] = str_replace('\n','',EMAIL_TICKET_1);

    I am using Zencart 1.3.9 and Sophie Blue template
    What am I missing?
    Thanks

    Keith Bradley

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Adding a field to the Confirmation Email

    Use the developers tool kit to look up another "constant" that is default to ZenCart - -
    See the places that it is defined and insure that your new constant "$EMAIL_TICKET_1" is added to all of the places required
    Zen-Venom Get Bitten

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

    Default Re: Adding a field to the Confirmation Email

    Quote Originally Posted by kbradley View Post
    admin/orders.php
    added after line 124:
    $html_msg['EMAIL_TICKET_1'] = str_replace('\n','',EMAIL_TICKET_1);
    Order confirmations aren't handled via the admin side. So editing that file isn't going to accomplish your stated goals.
    For the emails sent to the customer when they are placing their order, you'll need to edit the send_order_emails() method of the /includes/classes/orders.php class file.
    .

    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.

  4. #4
    Join Date
    Apr 2010
    Location
    Canada, Winnipeg
    Posts
    15
    Plugin Contributions
    0

    Default Re: Adding a field to the Confirmation Email

    Thanks for the answer. It solved my problem.
    I am now continuing with adding a ticket to the email.
    I am impressed with the size of the forum, and the speedy answers.

    Keith Bradley

  5. #5
    Join Date
    Apr 2010
    Location
    Canada, Winnipeg
    Posts
    15
    Plugin Contributions
    0

    Default How to add a field in email confirmation

    I created an admission ticket which is mailed out following the confirmation email.
    I would like to add seat allocation, but I need the quantity of seats remaing at the time of sale.
    Do I have to read the database from table 'Products' and field 'products_quantity' or are they accessible in the system?
    All I need is 'products_ quantity' and I can figure out the rest.
    The function 'zen_get_products_stock' seems to get the item I want, but I don't know how to use it?
    Does the call go in includes/classes/orders.php?
    I am using ZenCart 1.3.8 and Sophie Blue template.
    Take a look at:
    http://prairiedogcentralrailway.com/...index&cPath=85
    If you want to buy a seat, use the dummy credit card code 4030000010001234 CCV 123
    (test only)

    Thankyou

    Keith Bradley

 

 

Similar Threads

  1. Customize Order Confirmation Email - Add Field
    By Toot4fun in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 28 Mar 2010, 08:00 PM
  2. How did you hear about us field in Order Confirmation Email
    By zepher in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 23 Mar 2010, 02:47 PM
  3. how to add notice to confirmation email
    By gsdcypher in forum General Questions
    Replies: 11
    Last Post: 29 May 2008, 09:07 PM
  4. How to override header_php.php or how to add a new field to order confirmation email
    By monkeytown in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 25 Jan 2008, 06:01 PM
  5. Help regarding how to add telephone field to order confirmation
    By signus in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 4 Sep 2007, 07:47 PM

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