Attaching an anchor to liquid variables (f.e. product.url)

Dear community,

I replaced the “add to cart” button with a simple product.url redirection, so the button actually leads to the product page first.
But is it possible to attach an anchor link (#anchorname) from the product pages to this dynamic url, so it leads to the (/product-link#anchorname) ?

Thanks in advance!

Found out by myself. For those who might face the same problem:


Thanks anyway :slightly_smiling_face:

@LexMeo

Where do you add this code for the anchor?

I am trying to redirect 3 buttons to different sections in a same page.