Hello,
I created my own custom product page and I just want to be able to add the current displayed product on #productPage1 to the cart. However I cannot get my code to work.
I am not using a dataset everything is coded.
let product;
$w.onReady(async()=>{
product =await$w('#productPage1').getProduct();})
}
});
export function addToCart_click(event) {
let productId = product._id;
$w("#shoppingCartIcon1").addToCart(productId)
}
Any Ideas on how to add the product that is currently shown on the product page?