Use a Formidable form on your WooCommerce product pages. Create your form however you would like, add a calculation to generate the total, and select your form in the sidebar box on the WooCommerce page. Now you can collect whatever information you would like before a product is added to the cart, and even include variable pricing based on the options chosen in the form.
WooCommerce is an eCommerce plugin used on millions of WordPress sites. You can get download WooCommerce free over at WordPress.org and immediately start collecting payments from your customers.