How can I add an estimated delivery date to my products?

How can I add an estimated delivery date to my products?

yonatanmikunis
Tourist
9 0 1

Hello,

I am trying to add estimated delivery date to all my products. I want to add a delivery time of the date that the customer makes the purchase to 75 days after that date. I want it to be displayes at the cart page. Is it possible to add a cose that takes the date of the purchase + the date after 75 days? for example for today's purchase - Estimated delivey time 09/07/2023- 11/22/2023. Thank you.

  

Replies 4 (4)
yonatanmikunis
Tourist
9 0 1

Thank you very much! waiting for your response.

PaulNewton
Shopify Partner
6737 610 1436

This is possible but has a complication because of how shopify caches pages.

So customers can be served a page with the wrong dates, because the page is old.

 

This shouldn't be much of an issue for the cart page as products are added to it.

To really be sure a combination of external javascipt time service (don't rely on visitors browser clock), or reference a metafield updatded by shopify-flow should be used.

 

Crudely for modern OS2.0 compatible themes in the theme editor for the cart-template you'd put something like the following in a custom-liquid section/block or section

Roughly to add 75 days to the current date:

{%- if cart.item_count > 0 -%}
 {% assign delivery_delay = 75  %}
 {% assign delivery_delay_seconds = delivery_delay | times: 24 | times:60 | date: '%s' %}

 {{ 'now' | date: '%s' | date: '%Y-%m-%d' }} - {{ 'now' | date: '%s' | plus: delivery_delay_seconds  | date: '%Y-%m-%d' }}

{%- endif -%}

 

If you need this customization then contact me directly by email for services.
Please always provide context, examples: store url, theme name, post url(s) , or any further detail.
Contact Info in signature.

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


yonatanmikunis
Tourist
9 0 1
Hello,
it can be very useful to me! I would like to get the customization please.
Store's Url - https://hikeyourz.com/
Theme name - "Dawn" theme
Thank you for your response.

ankitsharma14
Shopify Partner
25 0 3

Hi

 

There are a few apps available on Shopify ecosystem such as "Estimated Delivery Date ‑ Plus", "Estimated Delivery Date ‑ ETA", EDD: estimated delivery date". You may use any one of the above apps.

I hope I have tried to answer your queries.

 

Ankit Sharma

Ankit Sharma