div class not updating

Solved
Highlighted
Tourist
3 1 0

Hi, this problem seems simple but I can´t figure it out. I am trying to add a custom class on the div containing the price on product.liquid section of my theme but after adding it, it will not show on website front end. 

To clarify: 

Original div tag is this <div class="price {% if section.settings.show_smart_checkout %} smart_checkout_price_pos {% endif %}"> and I updated to <div class="price {% if section.settings.show_smart_checkout %} smart_checkout_price_pos {% endif %} newclass">

I am doing this on a theme not published yet. Other changes to the code worked fine. 

Why would this change not apply?

0 Likes
Highlighted
Shopify Partner
1157 246 344

Hey there,

It should work. Which theme you are using?

There can be if and else condition. Maybe you are changing in the wrong place.

Please check liquid code conditions and place your class accordingly.

 

Thanks!

If helpful then please Like and Accept Solution.
Do you need custom changes on store ? Hire me.
Feel free to Contact me on dmw.webartisan@gmail.com
Follow us on Instagram @dmw.webartisan
0 Likes
Highlighted
Tourist
3 1 0

Hi thanks for the reply!

I´m using ShowTime cooktime theme (https://themes.shopify.com/themes/showtime/styles/cooktime). After your question I tried doing a similar change on Brookling theme and it shows ok. 

I also tried including the new class before the if condition like this <div class="newclass price .... but it´s ignored too. 

At least I know it has something to do with the theme...

0 Likes
Highlighted
Tourist
3 1 0

This is an accepted solution.

Solved it! Theme has 2 equal sections with the same html... 

thanks for the help

0 Likes
Highlighted
Shopify Partner
1157 246 344

This is an accepted solution.

Try to put your new class with other div's which are having if condition. Check if things are working over there.

 

If helpful then please Like and Accept Solution.
Do you need custom changes on store ? Hire me.
Feel free to Contact me on dmw.webartisan@gmail.com
Follow us on Instagram @dmw.webartisan
0 Likes
Highlighted
Shopify Partner
1157 246 344

Yes, That I wanted you to check conditions in liquid. 

Great, it worked for you. :) 

 

Please give Likes. It will cost of my time. 

 

Thanks!

If helpful then please Like and Accept Solution.
Do you need custom changes on store ? Hire me.
Feel free to Contact me on dmw.webartisan@gmail.com
Follow us on Instagram @dmw.webartisan
0 Likes