Remove "add to cart" button based on conditional logic

Hi
I’m using ACF to display “prices from” on some products. On these products I would like to remove the “add to cart” button element when prices from is active and displayed. I’ve attempted this but can’t seem to get anything I’m doing to work. Is this something you can help with please?

Hi Lee,

Thanks for reaching out.
You can use {{dc:acf:field field="field_anem}} dynamic content tag for the Add to Cart Button element and check if that matches with the given value to show the button.

Hope it helps.
Thanks

Is this in the customize tab and then conditions section of the add to cart button element

Hello Lee,

Yes, you need to go to the Add to Cart element —>Customize —>Conditions. You need to select the string/number based on the ACF output and then you need to insert the dynamic content code there to set the conditions.


In case you have not seen the condition and assignment doc please have a look at it to learn more about how to set the conditions.

Hope it helps
Thanks

Thank you so much that has solved the issue for me

Hi Lee,

Glad that we are able to help you.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.