How determine the class name or id of the "buy" button for all themes

Francesco8
New Member
2 0 0

Hello everyone,

I'm developing an app, it should hide the "buy" button and add a custom one written by me using custom code and using scriptTag. This must work on all ecommerce / themes that install it. So far there are no problems, the problem is that I have seen that different pages with different themes use different class names or ids to identify the "buy" button, so it is not possible to create a standard script that works independently for all ecommerce, precisely because they use different id or class names to identify the same "buy" button. How could I understand on which liquid file (section or snippets) and on which id or class name to execute the custom code automatically?

0 Likes