Dawn Theme - Sale Badge change to In-Stock - Make appear when Price and Compare at price are equal

jca123
Tourist
12 1 3

In Dawn, the sale badge appears if the item is in stock and the product price is less than the compare at price. If the item is out of stock the sold out badge appears if inventory is zero. This happens regardless of what price is entered into the compare at price.

We have gone into edit languages and changed the "Sale" text to "In-Stock". This works great until the product price is equal to the compare at price or if a compare at price isn't present. Knowing that the Sale badge has been edited to "In-Stock" is there a way to force the "In-Stock" text to appear regardless of the compare at price? Many products don't have a compare at price and it is not feasible to make one up.

Thanks!

Replies 4 (4)

JHKCreate
Shopify Expert
3571 639 916

Hi @jca123 

This is indeed doable, would you mind sharing your store's URL so we can assist on that? It's a 1-min fix, however you would be losing the in-stock intelligence as you mentioned, so if you're okay with that let's do it!

Did we solve your issue? Like & Mark As Solution to help the community
Should you need any direct help: contact@jhkcreate.com

Learn more about us: jhkcreate.com
jca123
Tourist
12 1 3

Thanks for the reply. We are testing the Dawn template and it is not live.

I need the in-stock and sold out badges to work flawlessly based upon accurate inventory values.

I would like the in-stock (sale) badge to appear regardless of what the "compare at" price is set to. Currently, the in-stock badge disappears if the compare at price is equal to the price. 

In the attached example, there are four products. The first three products are in-stock however the in-stock (sale) badge doesn't appear since product price and compare at price are equal or the compare at price is zero. The last product is out of stock and the sold out badge is present. The sold out product is priced similarly to the other three products in that the product price and compare at price are equal or the compare at price is zero. What code or lack of code allows the sold out badge to appear regardless of the compare at price?

JHKCreate
Shopify Expert
3571 639 916

Hi @jca123 

You would have to remove the condition that compares the "compare at price" and the "price", can't really tell you where it is located without store access, however it's a quick conditional removal. 

Did we solve your issue? Like & Mark As Solution to help the community
Should you need any direct help: contact@jhkcreate.com

Learn more about us: jhkcreate.com
jca123
Tourist
12 1 3

Hi @JHKCreate

We are still trying to accomplish this task now that we are on a 2.0 theme (District 4.0). How would we remove the " remove the condition that compares the "compare at price" and the "price" so the In-Stock badge would appear regardless of any price differences? Our website is www.andysmusic.com. A selection of products may be seen at the link below. Most products on this page do not have the instock badge because behind the scenes compare price and price are equal to one another.

 

https://www.andysmusic.com/collections/acoustic-guitars?sort_by=manual&filter.v.price.gte=&filter.v....