Zen Cart Logo
Forums / General Questions / Use of undefined constant TEXT_INFO_ADDRESS_BOOK_COUNT_SINGLE

Use of undefined constant TEXT_INFO_ADDRESS_BOOK_COUNT_SINGLE

Views: 544

Results 1 to 6 of 6
15 Sep 2020, 11:18 AM
#1
himmon avatar

himmon

New Zenner

Join Date:
Oct 2010
Location:
London
Posts:
50
Plugin Contributions:
0

Use of undefined constant TEXT_INFO_ADDRESS_BOOK_COUNT_SINGLE

Hello guys,

I have the following error in my debug log which I recently noticed after installing the GDPR plugin from here from RYK post #144 who unfortunately provides no support from what I gather in the threads.

https://www.zen-cart.com/showthread.php?222981-General-Data-Protection-Rules-GDPR&p=1366876#post1366876

PHP Warning: Use of undefined constant TEXT_INFO_ADDRESS_BOOK_COUNT_SINGLE - assumed 'TEXT_INFO_ADDRESS_BOOK_COUNT_SINGLE' (this will throw an Error in a future version of PHP) in /Admin/customers.php on line 1303.

I also noticed in the admin/customers that it shows up like this which isn’t normal.

Attachment 19199

Any help would be greatly appreciated.

Many thanks

Nathan

15 Sep 2020, 11:24 AM
#2
himmon avatar

himmon

New Zenner

Join Date:
Oct 2010
Location:
London
Posts:
50
Plugin Contributions:
0

Re: Use of undefined constant TEXT_INFO_ADDRESS_BOOK_COUNT_SINGLE

BTW this is line 1303 from above in admin/customers.php.

            <td class="dataTableContent text-right"><?php echo $customer['customers_id'] . ($zc_address_book_count == 1 ? TEXT_INFO_ADDRESS_BOOK_COUNT_SINGLE : sprintf(TEXT_INFO_ADDRESS_BOOK_COUNT, zen_href_link(FILENAME_CUSTOMERS, 'action=list_addresses' . '&cID=' . $customer['customers_id'] . ($_GET['page'] > 0 ? '&page=' . $_GET['page'] : '')), $zc_address_book_count)); ?></td>
15 Sep 2020, 11:49 AM
#3
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Use of undefined constant TEXT_INFO_ADDRESS_BOOK_COUNT_SINGLE

TEXT_INFO_ADDRESS_BOOK_COUNT_SINGLE should be already defined in admin/includes/languages/english/customers.php

I would check that file.

16 Sep 2020, 4:53 PM
#4
himmon avatar

himmon

New Zenner

Join Date:
Oct 2010
Location:
London
Posts:
50
Plugin Contributions:
0

Re: Use of undefined constant TEXT_INFO_ADDRESS_BOOK_COUNT_SINGLE

Thanks for the hint Simon,

I checked the file admin/includes/languages/english/customers.php
as you said and I saw on:

Line 63
define('TEXT_INFO_ADDRESS_BOOK_COUNT', ' | 1 of ');

Does that mean there's a mismatch as it says TEXT_INFO_ADDRESS_BOOK_COUNT_SINGLE in original log file? If so, which file should I correct and should I include the _SINGLE bit at end or remove it?

PHP Warning: Use of undefined constant TEXT_INFO_ADDRESS_BOOK_COUNT_SINGLE - assumed 'TEXT_INFO_ADDRESS_BOOK_COUNT_SINGLE' (this will throw an Error in a future version of PHP) in /Admin/customers.php on line 1303.

Thanks very much.

Nathan

16 Sep 2020, 5:42 PM
#5
lat9 avatar

lat9

Administrator

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

Re: Use of undefined constant TEXT_INFO_ADDRESS_BOOK_COUNT_SINGLE

@himmon, look at the header-comment in that /admin/includes/english/customers.php. For zc157, it *should *read

<?php
/**
 * @copyright Copyright 2003-2020 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: Scott C Wilson 2020 Apr 08 Modified in v1.5.7 $
 */
16 Sep 2020, 6:05 PM
#6
himmon avatar

himmon

New Zenner

Join Date:
Oct 2010
Location:
London
Posts:
50
Plugin Contributions:
0

Re: Use of undefined constant TEXT_INFO_ADDRESS_BOOK_COUNT_SINGLE

Thanks Lat9, getting closer :smile:

<?php /** * @package admin * @copyright Copyright 2003-2016 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: Author: DrByte Sun Oct 18 23:54:03 2015 -0400 Modified in v1.5.5 $ */ Need to compare RYK GDPR Plugin gdpr4zc156c.zip admin/includes/languages/english/customers.php and merge changes with original copy of 1.5.7 customers.php Not sure how I missed an overwrite as usually check for merges. Thanks guys