function commerce_webform_alert_price_commerce_cart_line_item_refresh($line_item, $order_wrapper){
if($line_item->type=='commerce_webform'){
module_load_include('inc', 'webform', 'includes/webform.submissions');
$nid=$line_item->commerce_webform_nid['und'][0]['value'];
$sid=$line_item->commerce_webform_sid['und'][0]['value'];
$webform_object=webform_get_submission($nid, $sid);
$words=($webform_object->data[2][0]);
$price=35000+($words-300)*1.2*100;
$line_item->commerce_unit_price[LANGUAGE_NONE]['0']['amount'] = $price;
$line_item->commerce_unit_price[LANGUAGE_NONE][0]['data']['components'][0]['price']['amount'] = $price;
}
}
09-05
928