I have a feature wherein a product has discounted pricing lets say “Pre order” and I want it to become normal pricing 30 days after the date of creation. How should I do this?
I have now created a product that has an attribute status with value “Pre order” and if product’s status = “preorder” then its price is x - y.
after 30 days
Product’s status should change from “preorder” to “order” and if product’s status is “order” then its price is x.
Please help me out.
I would do something like setting up a background workflow (formerly API workflow). With the “make changes to a thing” that makes the price change.
Then on first creating the Thing (product) add a schedule background workflow at date of creation + 30 days.
After 30 days the background workflow will run in the background and bingo bongo the change in price will be made.
More than the price change im more interested in the status of the product change from “Pre order” to “order” based on which ill do a certain other things, price change is one of them. So that being said, background workflow should work for it ?
Yup. You can change anything just like a normal workflow. It’s basically the same thing but it runs “on its own” without being triggered by a user clicking a button for example.
You could have a thing of Yes/No type called. “pre order”. And a background workflow that changes “pre order” to No.
And then trigger the bg workflow at current date/time + 30 days.
And then have a number of conditions based on the yes/no status of your “pre order”. E.g show a specific icon. Or change the price text on a page from $149 to $230
In the same bg workflow you could also change price if the price is a Thing. Which is probably what I personally would prefer. But if you’re not saving the price to the database you could use a conditional for the text displaying the price.
This topic was automatically closed after 70 days. New replies are no longer allowed.