Commerce - Alter quanitity widget
Assuming that you allow decimal in the quantity field, you can use the hook_form_alter() hook. It is one of the most used drupal hooks.

/**
 * Implements hook_form_alter().
 */
function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {

  // add to cart form
  if (strpos($form_id, 'commerce_cart_add_to_cart_form_') === 0) {

    // Replace the text quantity field with a select list.
    if (isset($form['quantity']) &amp;&amp; ($form['quantity']['#type'] == 'textfield')) {

      $product = commerce_product_load($form['product_id']['#value']);
      $price = commerce_product_calculate_sell_price($product);

      $select = array(
        '0.1' =&gt; '100grams '.commerce_currency_format(1*$price['amount'], $price['currency_code'], $product),
        '0.2' =&gt; '200grams '.commerce_currency_format(2*$price['amount'], $price['currency_code'], $product),
        '0.3' =&gt; '300grams '.commerce_currency_format(3*$price['amount'], $price['currency_code'], $product),
        '0.4' =&gt; '400grams '.commerce_currency_format(4*$price['amount'], $price['currency_code'], $product),
      );

      $form['quantity']['#type'] = 'select';
      $form['quantity']['#options'] = $select;
      $form['quantity']['#size'] = 1;
    }
  }
}