How to connect custom product options to Cart on a dynamic product page.


I need some help with a problem I have with my page.
I am a beginner at coding and can’t solve this issue.

I have an AddToCart button on my dynamic page with multiple product options. (e.g. thickness, color, material, etc.)
I want to add the customised product to the Cart with all the options saved.

I already made a dataset to store these options. I tried to use some example codes that I found, but they didn’t work.

Can somebody help me with this?

export function addToCart_click ( event ) {
// Add your code for this event here: export function addToCartBtn_click(event, $w) {
const productId = $w ( ‘#dynamicDataset’ ). getCurrentItem (). _id ;
$w ( “#shoppingCartIcon2” ). addToCart ( productId );

1 Like

The option should be managed and retrieved via Wix Stores. You need to code in order to use repeater to display Color, Option, Custom Text Field for user to select/fill in.

For beginners, please visit Velo examples to learn more about the Wix Stores system (there is no code to copy and paste).

Alternatively, you can hire a Wix Velo Certified to help you with this.

Hello, we are experiencing the same problem. Any information we have found online regarding WIX product customisation is incomplete, as the add to cart and cart page information is missing. It would be great if WIX could help provide the required information or an online tutorial in Velo, as product customisation is becoming increasingly popular, so you will be empowering lots of WIX customers.

Thanks in advance:)