Shopify themes, liquid, logos, and UX
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.
Thank you very much! waiting for your response.
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
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
We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024