Zen Cart Logo
Forums / General Questions / Email constants not coming through

Email constants not coming through

Locked

Views: 1,514

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
17 Feb 2008, 5:51 PM
#1
dayo avatar

dayo

Zen Follower

Join Date:
Dec 2006
Posts:
187
Plugin Contributions:
1

Email constants not coming through

I am running a script as an IPN Handler for a payment module that is trigger when the payment site posts status updates.

There is an option to send out emails and while all the actions happen including the emails getting sent out, the email constants are not coming through.

Here is what a sample looks like.......

[store name displays correctly]
EMAIL_SEPARATOR
EMAIL_TEXT_ORDER_NUMBER [order number displays correctly]
EMAIL_TEXT_INVOICE_URL
[invoice url displays correctly]
EMAIL_TEXT_DATE_ORDERED [date displays correctly]

[status update message to customer displays correctly]

EMAIL_TEXT_PRODUCTS
EMAIL_SEPARATOR
[products display correctly]
	 
	 
EMAIL_SEPARATOR

EMAIL_TEXT_DELIVERY_ADDRESS
EMAIL_SEPARATOR
[address displays correctly]

EMAIL_TEXT_BILLING_ADDRESS
EMAIL_SEPARATOR
[address displays correctly]

Is there a file I need to require?

Thanks

17 Feb 2008, 8:23 PM
#2
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: Email constants not coming through

This is happening only with Paypal IPN or any order email?

17 Feb 2008, 8:47 PM
#3
dayo avatar

dayo

Zen Follower

Join Date:
Dec 2006
Posts:
187
Plugin Contributions:
1

Re: Email constants not coming through

Hi

It is not Paypal but yes it is just with a payment module I am working on.

After a transaction, the site posts status codes to a url I specify which in this case is a PHP script I wrote to update the orders_status table and send out an email to the customer.

The update works fine and the email is sent but it appears the email constants are not recognised as such.

I suspect there is something I need to require as the PHP file is not being called within ZC.

The prep section is as follows:

include('includes/application_top.php');

if(!$language) $language = 'english';
include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PROCESS);

// load payment module
$payment = 'my_payment_module';
require(DIR_WS_CLASSES . 'payment.php');
$payment_modules = new payment($payment);

// get order id
$order_id = sql query to get order id;

// load order
require(DIR_WS_CLASSES . 'order.php');
$order = new order($order_id);

I suspect there is another class or such I need to require or is there something else I should do to get access to those constants?

The other option obviously is to type in the required stuff into variables here and use those.

17 Feb 2008, 9:37 PM
#4
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: Email constants not coming through

The email text is defined in
includes\languages\english\checkout_process.php

17 Feb 2008, 10:10 PM
#5
dayo avatar

dayo

Zen Follower

Join Date:
Dec 2006
Posts:
187
Plugin Contributions:
1

Re: Email constants not coming through

Thanks for that

I copied the contents of the file to my script file and now get the definitions.

17 Feb 2008, 10:14 PM
#6
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: Email constants not coming through

Glad to be of any help!