I’m trying to add a product to the cart in my store, via click of a button. The product has 4 options and a mandatory custom text field. Im using the following code. Can anyone see where I am going wrong? The code seems to open up the shopping cart to the right of the page, but no product is added:
$w.onReady( function () {
//TODO: write your page related code here…
$w(“#button1”).onClick( () => {
$w(“#shoppingCartIcon1”).addToCart(“f40e3741-5c56-a54e-f4a8-6ee5ad994200”, 1, {
“choices”: [{
“Anti-Aging”: “None”},
{"Rejuvenating & Soothing": "None"},
{"Lifting & Firming": "None"},
{"Blemish Reduction": "None"}],
“customTextFields”: [{
“title”:“Who is the custom cream for?”,
“value”:“John”}]}
)
})
});