Skip to content

Instantly share code, notes, and snippets.

@dylanjhunt
Created April 28, 2021 15:06
Show Gist options
  • Save dylanjhunt/7eaed1da97cccd7db4ae30e2eae068f4 to your computer and use it in GitHub Desktop.
Save dylanjhunt/7eaed1da97cccd7db4ae30e2eae068f4 to your computer and use it in GitHub Desktop.
How to make a delivery date estimator that avoids weekends for a Shopify product page
{% assign seconds = 5 | times: 72 | times: 60 | times: 60 %}
<div class="get_it_by">
{% render 'icon_svg' with 'truck' %}
<p>Order in the next <strong id="HMSremaining"></strong>, and get {{ product.title }} by <strong id="deliveryday">{{ 'now' | date: "%s" | plus: seconds | date: "%A, %B %d" }}</strong> with expedited Shipping at checkout.</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment