You are here

function uc_atctweaks_feature_form in UC Add to Cart Tweaks 6

Same name and namespace in other branches
  1. 7 uc_atctweaks.module \uc_atctweaks_feature_form()
1 string reference to 'uc_atctweaks_feature_form'
uc_atctweaks_product_feature in ./uc_atctweaks.module
Implementation of hook_product_feature().

File

./uc_atctweaks.module, line 165
Defines a product feature to tweak the add to cart form behavior.

Code

function uc_atctweaks_feature_form($form_state, $node, $feature) {
  $form = array();

  // Load the Add to Cart Tweaks specific to this product.
  $data = db_fetch_object(db_query("SELECT * FROM {uc_atctweaks_products} WHERE pfid = %d", $feature['pfid']));
  $form['nid'] = array(
    '#type' => 'value',
    '#value' => $node->nid,
  );
  $form['pfid'] = array(
    '#type' => 'value',
    '#value' => $data ? $data->pfid : '',
  );
  $form += _uc_atctweaks_feature_form($data);
  return uc_product_feature_form($form);
}