I built a page where the customer can buy wood panels and choose the dimensions with 2 Text Inputs (length and width) and 4 Options. With Wix Code, I calculated the final price according to the customer's choices. Now, I want to add this product (with the price I calculated) in the Cart when the customer click on the "Add to Cart button".
I thought of 2 "ways" to achieve this goal :
1) When someone order the product and click on the "Add to cart" button, it programmatically creates a new product in the "Product Database" with parameters that the customer have chosen. However, I cannot find information on the internet to code that.
2) Create one product in the "Product Database" and programmatically change it's "parameters" (price, name, ...) every time someone order this product. I managed to find the parameters of the product but I can't programmatically change them.
Does anyone know a way or have a clue to code the first or/and the second "solution" ?
Thanks in advance.