If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT and starnge charecter

SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT and starnge charecter

Started by congerman on 14 Oct 2015, 3:27 PM · Views: 1,088

Results 1 to 20 of 28
14 Oct 2015, 3:27 PM
#1
congerman avatar

congerman

Zen Follower

Join Date:
Oct 2008
Posts:
392
Plugin Contributions:
0

Post #1 by congerman

Hi, I have looked through the forum for this and tried various "solutions" to no avail

My order confirmation emails have the subject "SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT Order confirmation No:

As this forum suggested I re uploaded my email extras files, shop and admin but that did not work. My language files are set to utf8. here is the relevant part of email extras

// Admin additional email subjects
define('SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT','[CREATE ACCOUNT]');
define('SEND_EXTRA_GV_CUSTOMER_EMAILS_TO_SUBJECT','[GV CUSTOMER SENT]');
define('SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT','[NEW ORDER]');
define('SEND_EXTRA_CC_EMAILS_TO_SUBJECT','[EXTRA CC ORDER info] #');

also in order confirmations the is a funny A before the £ sign
1 x Collapsible Funnel (CNF1) = £18.33

Sub-Total: £18.33
Shipping by UK Postcode (Parcel To: TN34 3SB): £7.50
VAT: £5.17
Total: £31.00

In admin, email options convert currencies for text emails is set to £,£:€,€

site is 25a.co.uk,

Thanks in advance

Congerman

14 Oct 2015, 7:59 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #2 by mc12345678

I don't necessarily have a direct solution for the extra character before the British pound symbol; however, with regards to the emails_extra issue...

Seems like the most likely issue is that you have a file named emails_extra.php in your includes/languages/english/YOUR_TEMPLATE/ directory and that it does not have the SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT constant defined in it

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

14 Oct 2015, 8:09 PM
#3
congerman avatar

congerman

Zen Follower

Join Date:
Oct 2008
Posts:
392
Plugin Contributions:
0

Post #3 by congerman

mc12345678:

I don't necessarily have a direct solution for the extra character before the British pound symbol; however, with regards to the emails_extra issue...

Seems like the most likely issue is that you have a file named emails_extra.php in your includes/languages/english/YOUR_TEMPLATE/ directory and that it does not have the SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT constant defined in it

I am not using that override file but thanks for the thought

Any other clues?

14 Oct 2015, 8:17 PM
#4
congerman avatar

congerman

Zen Follower

Join Date:
Oct 2008
Posts:
392
Plugin Contributions:
0

Post #4 by congerman

Just noticed that the wrong subject is not limited to order confirmation. It appears to be all mails sent to admin like this for create account email sent to admin ( [CREATE ACCOUNT] Welcome to 25A.co.uk was the subject )

14 Oct 2015, 8:18 PM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #5 by mc12345678

Congerman:

I am not using that override file but thanks for the thought

Any other clues?

Not to be a pain, but when you say not using, the question is really does it exist in filename or not?

The next set of questions or possibilities are,

  1. does your site offer any language other than english,
  2. has the english.php file in includes/languages been modified to remove loading of the FILENAME_EMAILS_EXTRA file.
  3. In developers toolkit, if you search for SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT in the loower left search box, how many instances appear and in what files? (Paste results between ```
    [CODE] and [/CODE]

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

14 Oct 2015, 8:24 PM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #6 by mc12345678

Congerman:

Just noticed that the wrong subject is not limited to order confirmation. It appears to be all mails sent to admin like this for create account email sent to admin ( [CREATE ACCOUNT] Welcome to 25A.co.uk was the subject )

That one is actually correctly formatted. Notice in the OP that

define('SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT','[CREATE ACCOUNT]');

The right side shows [CREATE ACCOUNT] as the text to be included...

Any error logs in your logs directory (ZC 1.5.1 and above) or cache directory (ZC 1.5.0 and below)..

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

14 Oct 2015, 8:26 PM
#7
congerman avatar

congerman

Zen Follower

Join Date:
Oct 2008
Posts:
392
Plugin Contributions:
0

Post #7 by congerman

I am not overriding email extras so it is using the base one. Below is sample from that file

define('SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT','[CREATE ACCOUNT]');
define('SEND_EXTRA_GV_CUSTOMER_EMAILS_TO_SUBJECT','[GV CUSTOMER SENT]');
define('SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT','[NEW ORDER]');
define('SEND_EXTRA_CC_EMAILS_TO_SUBJECT','[EXTRA CC ORDER info] #');

  1. English only

  2. FILENAME_EMAILS_EXTRA not found in my english.php

/home/sites/25a.co.uk/public_html/includes/classes/order.php

Line #1047 : zen_mail('', SEND_EXTRA_ORDER_EMAILS_TO, SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id,

/home/sites/25a.co.uk/public_html/includes/languages/english/email_extras.php

Line #42 : define('SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT','[NEW ORDER]');

14 Oct 2015, 8:28 PM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #8 by mc12345678

So this also leads to identifying if the email subject is properly formatted for substitution of the constant...

In includes/classes/order.php around line 1099 the content should read as below (ZC 1.5.4 used for this example):

zen_mail('', SEND_EXTRA_ORDER_EMAILS_TO, SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id,

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

14 Oct 2015, 8:34 PM
#9
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #9 by mc12345678

Congerman:

  1. FILENAME_EMAILS_EXTRA not found in my english.php

Yeah, that's because I requested the wrong information. :) Oops..

FILENAME_EMAIL_EXTRAS is the constant that should be expected... Under normal installations this should resolve to a define providing email_extras but...

Now because the create account works correctly, it would help to then search for the constant that provides that replacement, so try searching for: SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT using the above methodology.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

14 Oct 2015, 8:35 PM
#10
congerman avatar

congerman

Zen Follower

Join Date:
Oct 2008
Posts:
392
Plugin Contributions:
0

Post #10 by congerman

mc12345678:

So this also leads to identifying if the email subject is properly formatted for substitution of the constant...

In includes/classes/order.php around line 1099 the content should read as below (ZC 1.5.4 used for this example):

zen_mail('', SEND_EXTRA_ORDER_EMAILS_TO, SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id,


I have

zen_mail('', SEND_EXTRA_ORDER_EMAILS_TO, SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id,

14 Oct 2015, 8:39 PM
#11
congerman avatar

congerman

Zen Follower

Join Date:
Oct 2008
Posts:
392
Plugin Contributions:
0

Post #11 by congerman

mc12345678:

Yeah, that's because I requested the wrong information. :) Oops..

FILENAME_EMAIL_EXTRAS is the constant that should be expected... Under normal installations this should resolve to a define providing email_extras but...

Now because the create account works correctly, it would help to then search for the constant that provides that replacement, so try searching for: SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT using the above methodology.

found these but look ok to me?/home/sites/25a.co.uk/public_html/includes/languages/english/email_extras.php

Line #40 : define('SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT','[CREATE ACCOUNT]');

/home/sites/25a.co.uk/public_html/includes/languages/english/email_extrasold.php

Line #40 : define('SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT','[CREATE ACCOUNT]');

/home/sites/25a.co.uk/public_html/includes/modules/create_account.php

Line #426 : if (trim(SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT) != 'n/a') zen_mail('', SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO, SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT . ' ' . EMAIL_SUBJECT,

14 Oct 2015, 8:44 PM
#12
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #12 by mc12345678

Congerman:

found these but look ok to me?/home/sites/25a.co.uk/public_html/includes/languages/english/email_extras.php

Line #40 : define('SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT','[CREATE ACCOUNT]');

/home/sites/25a.co.uk/public_html/includes/languages/english/email_extrasold.php

Line #40 : define('SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT','[CREATE ACCOUNT]');

/home/sites/25a.co.uk/public_html/includes/modules/create_account.php

Line #426 : if (trim(SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT) != 'n/a') zen_mail('', SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO, SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT . ' ' . EMAIL_SUBJECT,

Ah ha.. There might be the issue...

Rename: includes/languages/english/email_extrasold.php
to: includes/languages/english/email_extrasold.php.old
Or to have some extension other than .php... (Preferably to be removed from the server entirely, but there may be content therein that you may want even though it is incorrectly renamed as "old".)

Though now I question that as a solution... Looking through the code there doesn't appear to be any way to pull the email_extras file using email_extrasold.php unless the constant FILENAME_EMAIL_EXTRAS has been reassigned to view that file... Seeing as that file doesn't return the "missing" constant it seems to be the one being loaded for some reason.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

14 Oct 2015, 8:51 PM
#13
congerman avatar

congerman

Zen Follower

Join Date:
Oct 2008
Posts:
392
Plugin Contributions:
0

Post #13 by congerman

mc12345678:

Ah ha.. There might be the issue...

Rename: includes/languages/english/email_extrasold.php
to: includes/languages/english/email_extrasold.php.old
Or to have some extension other than .php... (Preferably to be removed from the server entirely, but there may be content therein that you may want even though it is incorrectly renamed as "old".)

Though now I question that as a solution... Looking through the code there doesn't appear to be any way to pull the email_extras file using email_extrasold.php unless the constant FILENAME_EMAIL_EXTRAS has been reassigned to view that file... Seeing as that file doesn't return the "missing" constant it seems to be the one being loaded for some reason.

Nice thought but did not work admin email subject still says SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT Order Confirmation No: 6470

14 Oct 2015, 8:56 PM
#14
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #14 by mc12345678

Congerman:

Nice thought but did not work admin email subject still says SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT Order Confirmation No: 6470

What process is generating this? Is this a from a plugin on the admin side, or is this when a customer purchases from the store front?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

14 Oct 2015, 8:59 PM
#15
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,152
Plugin Contributions:
56

Post #15 by lat9

Do you, by any chance, have a file named /includes/languages/english/YOUR_TEMPLATE/email_extras.php? If so, check to make sure that the constant in question is defined in that file.

14 Oct 2015, 8:59 PM
#16
congerman avatar

congerman

Zen Follower

Join Date:
Oct 2008
Posts:
392
Plugin Contributions:
0

Post #16 by congerman

This is a customer order. I have just tried using the classic template and all was resolved.

It is a problem with "bana" template I guess

14 Oct 2015, 9:01 PM
#17
congerman avatar

congerman

Zen Follower

Join Date:
Oct 2008
Posts:
392
Plugin Contributions:
0

Post #17 by congerman

lat9:

Do you, by any chance, have a file named /includes/languages/english/YOUR_TEMPLATE/email_extras.php? If so, check to make sure that the constant in question is defined in that file.

no i don't

14 Oct 2015, 9:16 PM
#18
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #18 by mc12345678

Congerman:

no i don't

And you understand that YOUR_TEMPLATE represents the template override for your bana template correct?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

14 Oct 2015, 9:21 PM
#19
congerman avatar

congerman

Zen Follower

Join Date:
Oct 2008
Posts:
392
Plugin Contributions:
0

Post #19 by congerman

mc12345678:

And you understand that YOUR_TEMPLATE represents the template override for your bana template correct?

I am a zen follower, I have developed over 25 carts. I understand the override system

Thanks

14 Oct 2015, 9:30 PM
#20
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #20 by mc12345678

mc12345678:

And you understand that YOUR_TEMPLATE represents the template override for your bana template correct?

And to clarify (for fear of the above seeming rude) 1. We haven't talked about which version of ZC is involved,
2) The results of searching on FILENAME_EMAIL_EXTRAS hasn't been provided,
3) Haven't discussed how if at all includes/languages/english.php has been modified.

These three things in and of themselves can vary the default behaviour which should load the default version of the email_extras.php file if one does not exist in the template override directory at least in the latest ZC version (which this obviously is not based on the difference in line numbers for the same code provided above...)

So... That led both lat9 and I to ask about the same file in attempting a solution.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...