bigcommerce/bigcommerce-api-php — pull request #70 by zackkatz (2013-09-24 19:27:03+00:00)
Title: Allow creating/updating/deleting custom fields

You can now work with Custom Fields.

use Bigcommerce\Api\Client as Bigcommerce;

$Product = Bigcommerce::getProduct(1);

// Get a collection of Custom Fields for the product ID
Bigcommerce::getProductCustomFields($Product->id);

// Get the Custom Field with the ID #5 for the product ID
Bigcommerce::getProductCustomField($Product->id, 5);

// Create a Custom Field for the product ID
$id = Bigcommerce::createProductCustomField($Product->id, array(
'name'	=>	'Name of Custom Field',
'text'	=>	'Value of Custom Field'
));

// Delete the Custom Field with the ID #5 for the product ID
Bigcommerce::deleteProductCustomField($Product->id, 5);

// Or you can do it like other resources as well.
$CustomField = new Bigcommerce\Api\Resources\ProductCustomField(array(
'name'	=>	'Name of Custom Field',
'text'	=>	'Value of Custom Field',
'product_id' => 1 // The ID of the attached product
));
$CustomField->create();