Public Custom Field Flag
Released in 10.05.00
The 10.05.00 release adds a new boolean flag to all custom fields. A custom field can either be public or not public (private). The default value for all custom fields is not public, so you have to explicity set a field to be public.
What does "Public" Mean?
Public means that its value can be read using the runtime_XXX functions which don’t require any authentication. The data they return is public for anyone to view. Examples include:
- Runtime_ProductList_Load_Query
- Runtime_CategoryProductList_Load_Query
- Runtime_RelatedProductList_Load_Query
- Runtime_CategoryList_Load_Query
These functions have the ability to return custom fields for products/categories.
Use Case
For example, you may have a custom product field for internal cost that you track with each product. You would likely not want this custom field to be public. Alternatively, the Meta Fields module stores its data into a public custom field so its data is always available in the runtime_XXX functions.
XML Provisioning
A new “public” tag is now available within the XXXField_Add functions.
<Product|Category|Customer|OrderField_Add>
<Public>True|False</Public> <!-- Default value false -->
</Product|Category|CustomerField_Add>
<Product|Category|Customer|OrderField_Update>
<Public>True|False</Public>
</Product|Category|CustomerField_Update>