Personalized checkout and custom promotions with Shopify Scripts
Hi there,
Anyway to make a custom script only run for a designated amount of time (for example, only run between certain dates) without using Launchpad? We want to schedule multiple scripts but Launchpad only lets you run 1 event at a time.
Afaik ruby's TIME class is not available in scripts so you can't do scheduling in scripts that way.
So you need to create a to get the correct time reliably and in a way that's paresable in scripts.
Which means passing in the time from the frontend.
You need a time app|service to get the proper time and NOT the customers browser time.
Add the correct time as a line item property, or as a cart attribute to pass from the cart to checkout, or use ajax in the checkout templates.
Alternatively setup a literal product to use as your indicator for logic in scripts and autoadd it to the cart. Either as some empty free thing labeled like "limited offer", "holiday special" etc or some spiff product like free stickers.
Save time & money ,Ask Questions The Smart Way
Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org
User | RANK |
---|---|
4 | |
2 | |
2 | |
2 | |
2 |
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023