SOLVED: Custom "Add to Cart Button" title tags visible

Bricks Version: 1.5 beta
Browser: Firefox 102.0.1
OS: Windows 10 21H2
URL: https://bricks.tobiashaas.dev/

The Title Tag of the Button is visible on the Frontend
This isn’t the Woo element, it’s a regular button

I’ve added a button and added the following data - see screenshot.

Hi Tobias,

Welcome to the forum!

{woo_add_to_cart} dynamic tag outputs the HTML for “Add to cart” button like this:

<a href="?add-to-cart=247" data-quantity="1" class="button product_type_simple add_to_cart_button ajax_add_to_cart" data-product_id="247" data-product_sku="Woo-beanie-logo" aria-label="Add “Beanie with Logo” to your cart" rel="nofollow">Add to cart</a>

As far as I know, it is not valid to have HTML markup with links as value of title attribute.

What exactly are you trying to do by adding {woo_add_to_cart} dynamic tag as title?

Hi Sridar, thanks for replying.

The best way to see it is with a screenshot

There are single products but also some with variations.

If I use the add to cart element, I can already choose the variant on the card, which I don’t want, it should then link to the product

Okay so when I use Dynamic Content, in my case “add-to-cart” then it generates me the Add to Cart button, that’s why I have the <a> tag 2 times in the code…

I have now inserted a text instead of a button. That works so far.

Is that correct that the button has to be rendered separately here?

I just want the text :sweat_smile:

Not clear what your question is Tobias.

While the anchor tag in the HTML generated by that dynamic tag includes button as one of its classes, there’s no CSS for that class unless you manually add it. So it will be output like text when used on non product pages.

The post here can be closed. Because this is not a bug
@Sridhar I opened a new post about it under How to’s

I hope my question is clearer here