I currently have a problem when I need to add an option to the cart with a checkbox (for each item in the cart) that will change the price of the product using one of the custom attribute.
This is an illustration (I already created a custom field, I just need the function of updating the price when I click the "Update Cart" button)

Code to display a check box for each item (/woocommerce/templates/cart/cart.php):
<td class="product-url">
<?php
$html = sprintf( '<div class="lorem"><input type="checkbox" name="cart[%s][lorem]" value="%s" size="4" class="input-text url text" /> Lorem price</div>', $cart_item_key, esc_attr( $values['url'] ) );
echo $html;
?>
</td>
source
share