Hello! ![]()
I have a few simple lines of code on the product page that show two texts based on if a product is in stock or not. If a product is in stock it shows a delivery time of 1-2 days and if it is not it shows 2-5 days. For products that have delays and can first be delivered in future months I use an app called Pre-Order Now. This app allows me to display shipping information text on the product page as well, just for months instead of days.
Here is the problem: when a product is active in the app both shipping texts display at the same time. (For example both 2-5 days text and delivery in september text, see attached image) I need a simple if statement so that the shipping information based on stock levels only executes if the app text is not active on a product.
How could I achieve this? Is there a way to make an if statement based on if a HTML class is active on the page? This way only execute the code if that class is lacking?
This is the code for the stock based shipping text:
{% if product.variants.first.inventory_quantity > 0 %}
Thank you!
