are there common classes in all the themes?

Highlighted
New Member
3 0 0

Hi I need to add html in the cart using an script. But are there common classes in all the themes to find  the elements in the cart like checkout button, increment, decrement, quantity.?

Thanks

0 Likes
Highlighted
Shopify Expert
9978 110 1788

No. And even if there was a framework a merchant has control over the HTML in the theme so could change things to something else, or have them work in slightly different ways.

There is some basics like the names of fields, and the urls of default forms but not all themes will have those in the HTML. It's possible to have a JS rendered site making it a little harder for your code to detect.

What is it that you're adding? Maybe a little more context would help narrow down the approach.

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
Highlighted
New Member
3 0 0

Hi Jason , I 'm trying to add a checkbox input before the checkout button. And when the checkbox is checked it will add a product with price 0.

So I want to also remove quantity and increase / decrease buttons. I'm adding an example but I would like add it for any template. 

So it would be easy if I can use same classes for all the templates.

 

Your-Shopping-Cart-–-storydots.png

0 Likes