Pretend you are a seller and have a cart on your web page based on woocommerce. A buyer wants to buy 600g of a product. It is the maximum quantity he may buy. However he also wants 30g of one product and 40g of another. How can one add these products up before they reach the cart in PHP?