Zen Cart Logo
Forums / Managing Customers and Orders / Invoice suddenly shows table headings as TABLE_HEADING_PRODUCTS

Invoice suddenly shows table headings as TABLE_HEADING_PRODUCTS

Views: 854

Results 1 to 3 of 3
29 Jun 2016, 11:20 AM
#1
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Invoice suddenly shows table headings as TABLE_HEADING_PRODUCTS

I just noticed that my invoices since a couple of months no longer have the correct headings but all the variable names are shown instead, for example, TABLE_HEADING_PRODUCTS.
The packing slip continues to work fine.
I am using the classic green template.

I have the problem both on my web site and my PC test site and in both English and German languages.
I assume I must have changed something somewhere but what? I checked all the invoice.php files and none were changed/updated this year.
Is there another file involved in creating invoices?
The only big change to my site in the timescale was to add image zoom and CSS/JS loader.

I only noticed because I am (slowly) updating to v155a where the invoices are correctly created on my test site.

29 Jun 2016, 9:22 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Invoice suddenly shows table headings as TABLE_HEADING_PRODUCTS

Those are defined in language files.

If you're seeing them show as the uppercase keys (called "constants" in PHP) like TABLE_HEADING_PRODUCTS then likely the language file containing those specific definitions isn't getting loaded (cuz it's missing from your server).

ie: /admin/invoice.php generates output by asking the value of TABLE_HEADING_PRODUCTS to be displayed
and the normal admin bootup process auto-loads corresponding language files.

So either the /admin/invoice.php file (in this example) has been changed to look for "new" constants (ie: new columns you've added, perhaps?) that you haven't also defined. Or the main language files where those constants are usually defined are missing/damaged.

Whenever a "sudden" problem like this happens (when it wasn't happening previously), the first step is to go back and look at everything that's been changed on your server since it was working previously.

29 Jun 2016, 11:36 PM
#3
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Invoice suddenly shows table headings as TABLE_HEADING_PRODUCTS

DrByte:

Those are defined in language files.

If you're seeing them show as the uppercase keys (called "constants" in PHP) like TABLE_HEADING_PRODUCTS then likely the language file containing those specific definitions isn't getting loaded (cuz it's missing from your server).

ie: /admin/invoice.php generates output by asking the value of TABLE_HEADING_PRODUCTS to be displayed
and the normal admin bootup process auto-loads corresponding language files.

So either the /admin/invoice.php file (in this example) has been changed to look for "new" constants (ie: new columns you've added, perhaps?) that you haven't also defined. Or the main language files where those constants are usually defined are missing/damaged.

Whenever a "sudden" problem like this happens (when it wasn't happening previously), the first step is to go back and look at everything that's been changed on your server since it was working previously.

"Or the main language files where those constants are usually defined are missing/damaged." Many thanks, I did a compare between 151 and 155a and found a language file was missing; fixed now.

I will go and stand in the corner now!