Zen Cart Logo
Forums / General Questions / How to add a field to the Confirmation Email?

How to add a field to the Confirmation Email?

Locked

Views: 1,542

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
8 May 2010, 3:46 PM
#1
kbradley avatar

kbradley

New Zenner

Join Date:
Apr 2010
Location:
Canada, Winnipeg
Posts:
15
Plugin Contributions:
0

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

8 May 2010, 4:08 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to add 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

8 May 2010, 6:38 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: How to add a field to the Confirmation Email?

kbradley:

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.

11 May 2010, 2:05 PM
#4
kbradley avatar

kbradley

New Zenner

Join Date:
Apr 2010
Location:
Canada, Winnipeg
Posts:
15
Plugin Contributions:
0

Re: How to add 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:clap:

19 May 2010, 2:08 AM
#5
kbradley avatar

kbradley

New Zenner

Join Date:
Apr 2010
Location:
Canada, Winnipeg
Posts:
15
Plugin Contributions:
0

Re: How to add a field to the Confirmation Email?

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/zencart/index.php?main_page=index&cPath=85
If you want to buy a seat, use the dummy credit card code 4030000010001234 CCV 123
(test only)

Thankyou

Keith Bradley