New to Corvid, I have the following code, the console logs work, I am just having an issue setting the actual price in the document. could anyone help point me in the right direction?
$w.onReady(function () {
$w('#productPage1').getProduct()
.then( (product) => {
let oldformattedPrice = product.formattedPrice;
let newFormattedPrice = oldformattedPrice.split(".")[0].toString();
console.log(newFormattedPrice)
product.formattedPrice = newFormattedPrice;
} )
.catch( (error) => {
console.log(error);
} );
});