I want to add an event to send the Product Name to GTM when someone adds a product to their cart.
I've created an add_to_cart.override.tpl file to my changes.
But I don't know how to modify the but_onclick
What I'm looking to add is
on_click (event: "Product Added To Cart: {$Product.product})
CORE ADD TO CART code:
{include file="buttons/button.tpl" but_id=$but_id but_text=$but_text|default:__("add_to_cart") but_name=$but_name but_onclick=$but_onclick but_href=$but_href but_target=$but_target but_role=$but_role|default:"text" but_meta="ty-btn__primary ty-btn__big ty-btn__add-to-cart cm-form-dialog-closer"}