Issue with Adding to cart

I keep getting this error. I have referred to the forums and documentation on wix itself. But isn’t any more info or maybe i am misreading the info. Although it would be great if anyone could help me figure out this!

FetchError: {"code":"CANNOT_ADD_CART","commandName":"AddToCart","message":"option Fabric for product with id 9b74bf6b-6288-66a3-e317-07f9d83e76ac is required","field":""}

So, I have added a regular button, changed its ID to #addToCardButton.
#pdtId is a hidden text box on page with the id of the product on DYNAMIC page
selectedOptions{}, is where I have stored my dynamic values, which I needed to be added to cart along with the product when the user selects it.

export function addToCartButton_click(event) {
//$w('#shoppingCartIcon1').addToCart(productId, 1, {choices: selectedOptions});

let d = $w('#pdtId').text;
$w('#shoppingCartIcon1').addToCart(d, 1, {"options": {choices: {"Fabric": "selectedOptions[1]","Button": selectedOptions[2], "Color": selectedOptions[3],"Zip": selectedOptions[4]}},})
.then( () => {
console.log("Product added");
} )
.catch( (error) => {
console.log(error);
} );
}

Overall, I am just trying to add certain customization options to products on my website which I wasn.t able to add through wix store, So I created dynamic page, linked everything but adding to cart isnt working, normal add to cart button (the one provided by wix) links to normal page’s add to cart page and cannot be changed, also it needed to added product specific. And I guessed the first commented line only would be enough, it would be great if you can tell why it isnt.
Thanks in advance for anything that could be of help.

Hello.

AddToCartOptions only works for predefined option fields like Size, Color that are available via the dashboard.

Feel free to post your Feature Reques ts .

Regards!