Dawn 15.2: "Inventory Status" customization

Dawn 15.2: "Inventory Status" customization

ryanb819z
Tourist
25 0 1

Hey all! I figured out how to turn on Inventory Status for the Dawn theme, but it doesn't show on items where inventory is not tracked. I would like the "in stock" option to show for those items as well. Any help with this would be greatly appreciated. Thanks!

Replies 17 (17)

Shadab_dev
Shopify Partner
1313 66 148

A bit of liquid coding to just check if the items is in stock or not would do it.

Buy me Coffee, if you feel i was helpful. Email Me here or WhatsApp me with this link for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
ryanb819z
Tourist
25 0 1

Yeah I'm just looking for help with the code there to be sure the in stock notification shows up when inventory is not tracked.

Shadab_dev
Shopify Partner
1313 66 148

Please share your store url for reference, I will try sharing the code with you

Buy me Coffee, if you feel i was helpful. Email Me here or WhatsApp me with this link for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
ryanb819z
Tourist
25 0 1

I just DM'd you as I don't post my site here and the theme is inactive.

Shadab_dev
Shopify Partner
1313 66 148

got it. but where does the in-stock badge show now? i wanted to see the reference of how your badge is showing up

Buy me Coffee, if you feel i was helpful. Email Me here or WhatsApp me with this link for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
Shadab_dev
Shopify Partner
1313 66 148

This is how i am showing it on my dev store just as an example regardless of quantity is being tracked or not

Shadab_dev_0-1729277333866.png

 

Buy me Coffee, if you feel i was helpful. Email Me here or WhatsApp me with this link for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
ryanb819z
Tourist
25 0 1

This is on the product page. I'll send you some links.

Shadab_dev
Shopify Partner
1313 66 148

okay so just check by doing this.

Open your customizer and select the product template from the dropdown. And under product information add a custom liquid block and paste the code. Drag the custom liquid block where you want to show the in stock thing


{% if product.variants.first.inventory_management == nil and product.available %}

<div style="background: lightgrey;
border-radius: 50px;
width: fit-content;
padding: 5px 12px;" class="in-stock">In Stock</div>
{% endif %}

Shadab_dev_0-1729280266220.png


for every product whose inventory is not tracked you will get this grey badge. Check and let me know

Buy me Coffee, if you feel i was helpful. Email Me here or WhatsApp me with this link for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
ryanb819z
Tourist
25 0 1

Thanks! However, I prefer it to show like the default that's in the images/links I DM'd you.

Shadab_dev
Shopify Partner
1313 66 148

Honestly man, i just wanted to check if it was working for you. I would have taken care of the part to make it look like the ones you have now, but i guess you can take care of it. At least do let me know if the code works out for you or not.

Thanks

Buy me Coffee, if you feel i was helpful. Email Me here or WhatsApp me with this link for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
ryanb819z
Tourist
25 0 1

Ah, okay. It does indeed work! However...it just creates more padding between the other elements there. If you look at the screenshots I sent you, you'll see the one that's *not* showing IN STOCK still has the space and padding where it should be. That's why I'm just trying to get whatever the liquid is for this that's already built into Shopify to show the message when inventory isn't tracked as well.

Shadab_dev
Shopify Partner
1313 66 148

Thanks for the update. 

 

Yeah I see the space that's been left out. I am not on my system now. Will check may be they are using css to hide it. If they are just removing it would do but if it involves liquid inside the code editor then I might need collaborator access to your store.

 

Thanks

Buy me Coffee, if you feel i was helpful. Email Me here or WhatsApp me with this link for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
ryanb819z
Tourist
25 0 1

Cheers. I did reach out to them as well but I'm still awaiting an answer from escalation. I can wait for that if you want to before you spend time on it.

Shadab_dev
Shopify Partner
1313 66 148

Will definitely take a look 

Buy me Coffee, if you feel i was helpful. Email Me here or WhatsApp me with this link for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
ryanb819z
Tourist
25 0 1

I'll DM you the site and you can request access. Thanks!

Shadab_dev
Shopify Partner
1313 66 148

I know how to put this right. I need few things from you as you have a lot of products. Tell me 2 or 3 products That are atleast 9 in number in your inventory  since that is the threshold you are using to show the in-stock option. Hope you get the point

Buy me Coffee, if you feel i was helpful. Email Me here or WhatsApp me with this link for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
ryanb819z
Tourist
25 0 1

Sending you a DM now.