You are here

function commerce_cart_field_instance_is_attribute in Commerce Core 7

Determines whether or not a field instance is fucntioning as a product attribute field.

Parameters

$instance: The instance info array for the field instance.

Return value

Boolean indicating whether or not the field instance is an attribute field.

2 calls to commerce_cart_field_instance_is_attribute()
commerce_cart_add_to_cart_form in modules/cart/commerce_cart.module
Builds an Add to Cart form for a set of products.
commerce_cart_i18n_string_list_field_alter in modules/cart/commerce_cart.module
Implements hook_i18n_string_list_TEXTGROUP_alter().

File

modules/cart/commerce_cart.module, line 1619
Implements the shopping cart system and add to cart features.

Code

function commerce_cart_field_instance_is_attribute($instance) {
  $commerce_cart_settings = commerce_cart_field_instance_attribute_settings($instance);
  return !empty($commerce_cart_settings['attribute_field']);
}