This Function Has Been Available Since:
(AFCommerce v 2.1, Functions v 1.1)
Gets the value of any variable in the "config" database table.
Description
string = get_config_value ( varname )
This function is great to use to quickly get any configuration value, whether it be any of the default AFCommerce variables or any variables you add to the config table yourself. The function itself is only 4 lines, but helps you save many lines of php code because not only is it one line instead of 4, but you can use it in "if" and other conditional php statements.
Parameters
varname (string) - This is the variable name that you want the value for in the config table.
Return Values
Returns the varvalue (variable value) field for the varname (variable name) you wanted the value of. If this function fails, it returns nothing.
Open Source: YesPaul's Examples if (get_config_value ("storename") != "") { echo "Store Name: " . get_config_value ("storename"); }
|
Back to Functions List
|