You are here

function _webform_submit_product in Ubercart Webform Integration 7.3

Same name and namespace in other branches
  1. 6 components/product.inc \_webform_submit_product()
  2. 7.2 components/product.inc \_webform_submit_product()

Implementation of _webform_submit_component().

File

components/product.inc, line 271
Webform module product component.

Code

function _webform_submit_product($component, $value) {

  //   $return[0] = 'product';
  if (!empty($value)) {

    // Save the nid of the product.
    //     $return[1] = $component['extra']['product'];
    // Save the quantity.
    $return[0] = $value;
    return $return;
  }
  else {

    // Save the nid of the product.
    //     $return[1] = $component['extra']['product'];
    // Save the quantity.
    $return[0] = 0;
    return $return;
  }
}