Product Page: How to create a field showing the total value by fetching data from quantity-input

Hi Community,

this is my first post and I hope I give enough information to get help.
First of all, I am a total Wix Code newbie. I’ve red some guides but I still struggle.

So:

By regulations it is necessary for me to show the total price (depending on the quantity input) for a theoratical order. The new field with the total price has to be arranged under the quantity-input field.

  1. As I understand, I need to create a new variable e.g. “priceintotal” by:

<let priceintotal = quantity-input * product-price> ;

  1. Now I need to create a new div-class (lets call it “valueoforder”
Total price

Does it work like this?
Is this something I just need to copy into the console?
If it is working, how can I tell Wix the this element is something I want to show in the product page?

Thank’s so much!

bump I kept on searching the Wix Code Tutorials. Seems like I need to write a JS Function?