Getting the value of a custom field
To get the value of a custom field for a specific product, you must perform the following:
- Get the catalog manager.
Get an instance of the CatalogManager object.
- Get the specified product.
Get an instance of the product with the specified ID. For more information, see Querying products.
- Get the value of the field.
To set the value of the field you must call the GetValue method of the product instance. Pass the name of the field as an argument.
Here is a code example:
CatalogManager catalogManager = CatalogManager.GetManager();
Product product = catalogManager.GetProduct(productId);
// Product does not exist