How insert values from client page to database by use custom module
Here is way to do this. use line item type and create your filed.  Hook_commerce_cart_product_add() call in custom module.

  function mymodule_commerce_cart_product_add($order, $product, $quantity, $line_item) {

         $commerce_line_item = commerce_line_item_load($line_item-&gt;line_item_id);

         $field_main = $product-&gt;field_main['und']['0']['value'];

         $line_item-&gt;field_update[LANGUAGE_NONE][0]['value'] = $field_main;

         commerce_line_item_save($line_item);
     }


When user click on button "ADD PRODUCT TO CART", cart value add/update your commerce line item field.