Product Page Dynamic Price

Hi,
I am looking for help on the product page. I want to add a line of text that will be displayed in a container box for a finance calculator, the finance calculator must take the total price of the product and divide it by 15, then display the resulting price.

All that I need is the text to read for example… ‘Get this product from £30.00 per month’ then a button to link a Lightbox to apply for finance. Very similar to how Laybuy and Klarna advertise cost breakdown on products.

All that I need to know is how can the price, for example £30 match the price of each specific product? I have tried to link the price (text box) to the store/product database then ‘FormattedPrice’ but it doesn’t change according to which product the customer is viewing.

Please help as I am not knowledgeable on coding.

This snippet will be your first or one of your first places. You have to get the product information. The variables are global. Once you get the values back you can manipulate them. This will be put on the product page. You can’t change the price of the product (???) but you can create a text box which would be the value of a text box to that of a = productPrice/15.
You’d have to format it a bit and convert it to a string - “Get this for only " + a.toString() + " per month”. That should at least get you started.

function getProductInfo () {

 $w ( '#productPage1' ). getProduct () 

. then (( product ) => {

productName  =  product . name ; 
productDescription  =  product . description ; 
productPrice  =  product . price 
discountedPrice  =  product . discountedPrice 
trackInventory  =  product . trackInventory 
inStock  =  product . inStock 
quantityInStock  =  product . quantityInStock 
productType  =  product . productType  //Digital 
additionalInfoTitle  =  product . additionalInfoSections [ 0 ][ "title" ] 
additionalInfoDescription  =  product . additionalInfoSections [ 0 ][ "description" ] 

})
}