Your account does not currently allow posting of links. If you need to post a link of your site or relevant Wix content, you can “break” the URL by adding spaces, like this: www.wix . com/corvid Am Unable to Paste the Code; Sorry For the Inconvenience;[Actually its For me];
function getName (parameter) {
$w("#productPage").getProduct()
.then((product) =>{
let productName = product.name;
let productPrice = product.price;
let ProductNme = productName; //<---- what is this?
let ProductPri = productPrice; //<---- what is this?
var details = [];
details = [productName, productPrice];
console.log(details);
return details
})
.catch((error)=>{
console.log(error);
})
}
Why this?
let ProductNme = productName;
let ProductPri = productPrice;
$w.onReady(async function () {
console.log(getName())
});
function getName() {
let productName = "Product-1";
let productPrice = "Product-Price-1";
let details = [productName, productPrice];
return details
}