Ok, i have found the solution:
In the object $item i found this:
$item->legacy_values['variation_id']
which gives me the ID. Also in $item->legacy_values[]
array i have the both prices, which i take now:
function wpler_add_quantities_to_order_items($item, $cart_item_key, $values, $order) {
setlocale(LC_MONETARY, 'de_DE');
$price1 = doubleval($item->legacy_values['price1']);
$price2 = doubleval($item->legacy_values['price2']);
$r = $order->get_billing_postcode();
$rabatt = !empty($r)&&is_numeric($r)&&$r>0 ? doubleval($r) : 0;
$ep1 = calcPrices($price1, $price2, intval($values['quantity']), $rabatt);
$ep2 = calcPrices($price1, $price2, intval($values['quantity10']), $rabatt);
$ep3 = calcPrices($price1, $price2, intval($values['quantity20']), $rabatt);
$item->add_meta_data("Preis für {$values['quantity']} Stück", money_format('%.2n', $ep1));
$item->add_meta_data("Preis für {$values['quantity10']} Stück", money_format('%.2n', $ep2));
$item->add_meta_data("Preis für {$values['quantity20']} Stück", money_format('%.2n', $ep3));
}
add_filter('woocommerce_checkout_create_order_line_item', 'wpler_add_quantities_to_order_items', 10, 4);