We’re looking for a banner that displays a changing estimated delivery date. We produce products that have an 8 week lead time and it would be great to have a banner that shows the estimated delivery date by automatically adding 8 weeks onto the current date, or whatever lead time we choose to enter.
Thanks
Tom
Hi there, @Thomas15
Thanks for adding your idea to the Wishlist!
We’d be so grateful if you could provide more details by answering these questions:
-
Do you want to display this banner on some delivery app or on your website?
-
Would you like to always display this banner, which automatically will add 8 weeks to the current date? Or it should be triggered only after making a purchase?
-
Should it be floating or static banner?
Hi Max
We’d like the banner to display on our website, not apps, and for it to display it all the time on the product pages, so people can see this before they purchase something. A static banner would be good.
Thanks,
Tom
Got you, thanks!
Great news is that it’s possible to do this using our Banner app. Please create this widget in your account and customize it to your liking.
Let me know once it’s done and our devs will implement an automatic addition of 2 weeks to the current date
Hi Max
I already have a banner that just has text saying ‘8 week’s lead time’. I’ve looked at the banner widget and it’s not clear how I can change this to a changing date that’s always 8 weeks into the future. Can you explain in greater detail how this is done?
Thanks
Apologies, missed that!
It will be done with the custom code. I’ve shared your request with the devs and let you know once the solution is ready
Hi, @Thomas15
Here is the solution from our devs:
- Add a Text element to the widget and open Code Editor mode:
- Replace Sample Text with the code below:
Delivery date:
<iframe
src="about:blank"
style="display: none"
onload="
const d=new Date();
d.setDate(d.getDate() + 56);
this.parentNode.insertBefore(document.createTextNode(d.toLocaleDateString()), this);
this.remove();
"
></iframe>
Voiila! You’ve created a banner, automatically updating the delivery date:
Give it a try and let me know if you like the result
Hi Max,
This works really well its simple and effective, thank you for providing me with the solution.
Tom