To continue receiving payouts, you need to secure your account by turning on two-step authentication. If two-step authentication is not turned on your payouts will be paused. Learn more

If product is in stock, show shipping date, if product is pre-order do not show.

New Member
2 0 0

I  have a code needs to show the shipping terms phrase if product is in stock only. As there are some products on pre-order in our shop. But it won't work. Can anyone help? Thanks!

{% unless product.description contains "BUY NOW TO PRE-ORDER!" %}

<p> <img src="” style="height:25px;float:left;margin-right:10px;padding-bottom: 4px;">
Ships between <strong><span id="fromDate"></span> - <span id="toDate"></span></strong> </p>

{{ '//' | script_tag }}

var fromDate =;
if ( || {
fromDate =;
var toDate =;
if ( ||
toDate =;

document.getElementById('fromDate').innerHTML = fromDate.toString('dddd MMMM dS');
document.getElementById('toDate').innerHTML = toDate.toString('dddd MMMM dS');

{% endunless %}

Replies 0 (0)