const currentProduct = $w( ‘#dynamicDataset’ ).getCurrentItem()._id;
console.log(currentProduct);
// Add the current product to the cart with the user’s chosen background color, text color, custom text, and custom background image.
$w( ‘#shoppingCartIcon1’ ).addToCart(currentProduct._id, {
“choices” : {
//“Background Color”: $w(‘#colorText’).text,
},
“customTextFields” : [{
“title” : “Custom Text” ,
//“value”: $w(‘#textInput’).value
},
{
“title” : “Background Image” ,
“value” : $w( ‘#print’ ).src
}
]
});