Adding a dynamic add to cart button to dynamic page for products

I am attempting to create a new product page format for via dynamic pages, however I can’t seem to figure out how to create a dynamic add to cart button that will work for each different product/dynamic page.

The regular add to cart button from the stores menu does not change with the change of the pages and I don’t see any way to connect it to the dataset so it does.

I think I’ve figured out how to turn a regular button into an add to cart one via code, but how do I connect the code/button to the dataset so it knows exactly which product to add to cart?

I did search through the forums and found similar questions and attempted to implement, but I’m getting nowhere.

I would greatly appreciate a basic rundown of the steps required. Thank you.

1 Like

Okay fixed the main issue of not being able to link the product to the specific dynamic page by using the reference option. However I still can’t get any code to work to add that product to the cart. Any help would be greatly appreciated.

@nikolaynkv What did you do to make the first option work? I Can help via code. I was trying not to do this since there is an add to cart button in the stores that you can add, but doesn’t seem to be dynamic. How did you get it to be dynamic?
Thanks,
Tom

I am also looking for this solution please any from velo do help