Hello,
I am looking for help with a way to display sales on the home page of my store and scheduling them so they disappear when the sale is over. Our sales end at 11:59 pm local time and I don’t want to have to be awake to manually remove the sale content, or remove them hours early.
We do have Shopify Plus and can use Launchpad scheduling, but it gets complicated quickly making multiple versions of the same theme. I would rather have a section on the home page where I can plug in content and an ending date and have the content disappear once the ending date/time is reached.
I was able to set something like this up for Collections and Products by using metafields on the collection with an offer end date and offer description. I followed this guide: https://www.identixweb.com/shopify-collection-metafields/ and added an if/then that compares current time (with now function) to the ending time and only displays the content on collection/product if current time is < ending time.
Is there any way I can do this on the home page as well? We are using Dawn theme and right now I use the Multicolumn section to show 3 sales on the home page. I’m not a Liquid expert but is it possible to duplicate the Multicolumn section and add a date picker, then use if/then logic to display the content as I did on collections?
Related: I understand that the now function uses a cached date and time that can be off by hours. Is there a better way of doing a conditional display based on date/time, like Javascript? Any help is appreciated. My store URL is https://www.mojosportswearcompany.com/