I’m trying to create a workflow to handle a Pre-Order collection and New Releases collection via Flow. I have a Release Date in my Variant Metafields that I’d like to compare to “Now” or “Today” and essentially have anything in the future be placed into Pre-Order and anything in the past be removed. The New Releases would just be more about if that is within 60 days of “Now” or “Today”.
It seems like this has to be done with the “Run code” action and javascript? I’m not super skilled in JS so wondering if someone has already worked this out for something or know a similar workaround?
If you need this automation built for you then contact me for services
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
What are you trying to achieve when marking a product as “Pre-order”? Do you just want different text on the ATC button, or a note on the product page? Or are you hoping to use a Pre-order purchase option (selling plan) in Shopify, so the fulfillment is correctly scheduled, partial payments are available etc.?
As Paul mentioned, if you just want to show some different text on the product page, it’s probably easiest to code this in liquid.
For anything extra, I’d recommend using a pre-order app like ours to handle the scheduling of pre-orders, ensuring the customer is informed throughout their entire journey that it’s a pre-order, and when the expected ship date is, and to offer things like partial pay/customizable discounts.
You can also set up simpler “back-order” functionality, which will let you just update the button text, show a note on the product page, and have a line item attribute carry through to checkout. This can easily be applied catalog-wide too (or for specific products).
I’d be happy to help walk you through any of this if you needed, or send you some step-by-step videos, just let me know (we have a 100% free plan with no commission fees too)!
To handle Pre-Order and New Releases collections based on the Release Date in your Variant Metafields, you’re right that this will likely require some custom JavaScript using the “Run code” action in Shopify Flow. You’ll need to compare the metafield date to the current date (new Date()) in JavaScript. For Pre-Orders, check if the release date is in the future, and for New Releases, check if the release date is within 60 days of today’s date.