How do I find the value of a configuration setting?

Where are the all-uppercase strings set?

If you’re modifying a template and you want to check a config value, you can look at the All Configuration Settings page and do a search for the configuration title. The configuration key will be shown when you find it, and you can use that in your code. The configuration key is created as a defined constant as part of the initialization code.

Example: You want to display the value of the email address that emails are sent from.

Go to the page linked above, and search for sent FROM. You’ll see that the configuration key is EMAIL_FROM. It’s a defined constant so it doesn’t need a $.

<?php
echo "We welcome your feedback - just email " . EMAIL_FROM . ".<br />"; 

Conversely, if you’re modifying a template, you might see a config like SHOW_TOTALS_IN_CART. If you want to know where it is set, look at the All Configuration Settings page, and search for it. When you see it, look back up to the last header, you’ll see it’s in Configuration > Layout Settings, so now you know where it is set.

If you have an all uppercase value referenced in your template, and you don’t see the value in configuration settings, it’s likely a language string.




Still have questions? Use the Search box in the upper right, or try the full list of FAQs. If you can't find it there, head over to the Zen Cart support forum and ask there in the appropriate subforum. In your post, please include your Zen Cart and PHP versions, and a link to your site.

Is there an error or omission on this page? Please post to General Questions on the support forum. Or, if you'd like to open a pull request, just review the guidelines and get started. You can even PR right here.
Last modified September 13, 2020 by Scott C Wilson (0271e06).