Closed handplant closed 4 years ago
Okay, sorry. I got it.
{{ entry.productDetails.getBuyNowButton({
additionalProps: {
'data-item-has-taxes-included': true
}
}) | raw }}
You beat me to it, @handplant!
You can pass an additionalProps
object to getBuyNowButton()
with any additional attributes you’d like to set on the element. In this case, if productDetailsFieldHandle
is your Product Details field, your template could look like this:
{{ entry.productDetailsFieldHandle.getBuyNowButton({
additionalProps: {
'data-item-has-taxes-included': "true",
}
}) | raw }}
Note I’m quoting "true"
above, as your example would output a 1
instead.
Hello, I need the following attribute
data-item-has-taxes-included="true"
for the Buy Button for a german shop. The attribute is described here. https://docs.snipcart.com/v2/setup/taxesHow can I implement this with the plugin?