How to add external data to calculator

Hi, I am trying to make a customized calculator.

I have made a database and connected this to several images of fabrics on my site.
When a customer presses an image of a fabric, I want a calculator to appear on the right side where they need to add height and lenght of the desired curtain, made with the previously selected fabric type.

I want to be able to automatically connect the price of this selected fabric on the left, to the calculator on the right.
I don’t want customers to have to reselect manually the name (and price) of the fabric again.
I have made a calculator with lumifish (the one that wix promotes) but after contacting the lumifish and wix support centers, it was clear that this calculator can’t connect with external data.
I need to write a code for this (which is new to me). I am able to make formula’s, but which (piece of) code do I need to connect the price to the rest of my formula?
kind regards,
Veronique

I solved a similar problem through the stepFORM tool found in Google. A picture was added directly to the calculator, and when you clicked on it, the necessary fields were displayed, where items were selected and values were entered. Prices were linked through a special formula editor. All calculations take place automatically, the client needs to choose certain parameters and the price is calculated on its own. You can connect to external data through the HTML widget, you can send data to other services via webhooks.