Ajax callback values not saved on submit
So, product_id was rendered but its value not passed to the commerce_cart_add_to_cart_form. This is how I solved it. 

Add to Cart Form Alter

if (strstr($form_id, 'commerce_cart_add_to_cart_form')) {

  $form['product_id']['#type']='hidden';  
  $form['product_id']['#prefix']='&lt;div id="liberte_pid"&gt;';   
  $form['product_id']['#suffix']='&lt;/div&gt;';
  //...


Ajax callback

$form['product_id']['#value'] = array( 
  $pid,     
);
$commands[] = ajax_command_replace('#liberte_pid', drupal_render($form['product_id']));


It's quite simple once you know it : before calling ajax_command_replace() you don't need to rebuild the full form element, just set the wanted attribute, and drupal_render($form['form_elt'])) will do the magic :)