You are here

function uc_attribute_uc_add_to_cart_data in Ubercart 8.4

Same name and namespace in other branches
  1. 7.3 uc_attribute/uc_attribute.module \uc_attribute_uc_add_to_cart_data()

Implements hook_uc_add_to_cart_data().

Stores the customer's choices in the cart.

File

uc_attribute/uc_attribute.module, line 309
Ubercart Attribute module.

Code

function uc_attribute_uc_add_to_cart_data($form_values) {
  if (isset($form_values['attributes'])) {
    return [
      'attributes' => $form_values['attributes'],
    ];
  }
  else {
    return [
      'attributes' => [],
    ];
  }
}