
Originally Posted by
mc12345678
I haven't gone back out to see if those two functions balk at processing an empty string or just trying to process a null value. "Simplest" solution to address both possibilities the "fastest" is to add before the strtolower function:
isset($products->fields['products_dim_type']) ?
Then just before the closing semi colon add:
: ''
That last part is two single quotes not to be confused with a double quote.
Then do s something similar with the second line, but using the correct "variable".
See how that goes and in the future could you maybe provide more of the error log content if it is there? Often don't need to know the very specific path, but the other content about the problem is helpful.
mc--thank you for your help. After a lot of trial and error, I found one issue was with an extra space after a comma in the configuration menu where I was listing out the fields I wanted to display. Removing the extra space made the desired variables display. However, I still am failing at how to get the label from the language file attached to each one. I can see why it is displaying the way it is--the code defines the field name based on the sql entry, but any way to replace that with the respective label from the language file?
Code:
<!-- BEGIN NPF MODIFICATIONS -->
<?php
if(count($numinix_fields_display ) > 0) { ?>
<?php foreach ($numinix_fields_display as $field => $value) {
$field_name = ucwords(str_replace('_', ' ', $field));
?>
<li class="list-group-item"><?php echo $field_name . ': ' . $value; ?></li>
<?php } ?>
<?php } ?>
<!-- END NPF MODIFICATIONS -->
Attached is the most recent log file, even after implementation of your code fix. Perhaps I missed something in install, but have gone over it several times and thought I had double checked everything...
Code:
14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php(24): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(132): include('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined variable $npf_attributes in /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php on line 24.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php(32): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(132): include('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined array key "products_length" in /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php on line 32.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php(33): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(132): include('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined array key "products_width" in /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php on line 33.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php(34): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(132): include('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined array key "products_height" in /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php on line 34.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php(35): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(132): include('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined array key "products_diameter" in /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php on line 35.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php(37): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(132): include('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined array key "products_actual_weight" in /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php on line 37.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php(40): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(132): include('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined array key "products_description2" in /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php on line 40.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php(41): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(132): include('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined array key "care_instructions" in /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php on line 41.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php(42): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(132): include('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined array key "products_condition" in /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php on line 42.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php(43): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(132): include('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined array key "products_upc" in /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php on line 43.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php(44): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(132): include('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined array key "products_isbn" in /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php on line 44.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php(45): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(132): include('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined array key "out_of_stock" in /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php on line 45.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php(46): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(132): include('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined array key "products_sku" in /home/thecoinauthority/public_html/includes/templates/bootstrap/product_info/extra_main_template_vars/numinix_product_fields.php on line 46.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php(165): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(156): require('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined variable $flag_show_product_info_dimensions in /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php on line 165.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php(166): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(156): require('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined variable $flag_show_product_info_condition in /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php on line 166.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php(167): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(156): require('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined variable $flag_show_product_info_upc in /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php on line 167.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php(168): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(156): require('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined variable $flag_show_product_info_isbn in /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php on line 168.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php(177): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(156): require('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined variable $flag_show_product_info_actual_weight in /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php on line 177.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php(178): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(156): require('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined variable $flag_show_product_info_dimensions in /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php on line 178.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php(179): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(156): require('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined variable $flag_show_product_info_diameter in /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php on line 179.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php(182): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(156): require('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined variable $flag_show_product_info_condition in /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php on line 182.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php(183): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(156): require('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined variable $flag_show_product_info_upc in /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php on line 183.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php(184): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(156): require('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined variable $flag_show_product_info_isbn in /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php on line 184.
[14-Jul-2023 18:21:23 America/Los_Angeles] Request URI: /index.php?main_page=product_info&cPath=1_2_13&products_id=1, IP address: 47.155.122.25, Language id 1
#0 /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php(185): zen_debug_error_handler()
#1 /home/thecoinauthority/public_html/includes/modules/pages/product_info/main_template_vars.php(156): require('/home/thecoinau...')
#2 /home/thecoinauthority/public_html/includes/templates/bootstrap/common/tpl_main_page.php(216): require('/home/thecoinau...')
#3 /home/thecoinauthority/public_html/index.php(94): require('/home/thecoinau...')
--> PHP Warning: Undefined variable $flag_show_product_info_sku in /home/thecoinauthority/public_html/includes/templates/bootstrap/templates/tpl_product_info_display.php on line 185.
Bookmarks