Is it possible to let customers enter their email on individual product pages if the stock is 0, and then automatically send them an email when the stock goes above 0 again?
2 Answers
This is not currently possible out of the box with Commerce at time of writing (Sept 2016).
You could write a custom plugin to do it, which would basically keep a table of these people-to-contact, and run a task (or use a controller you trigger by cronjob) -> to send out the emails at such a time the product is re-stocked.
It wouldn't be spectacularly difficult to implement. Here's a rough sketch:
A form on the site to accept the email addresses -> that form posts to a controller in your plugin - which stores a record of the product, customer email, and date emailed (date emailed is initially null).
You then have a task that periodically runs and checks these records - for each record, if there is no date emailed, check the stock of the product - if greater than zero, send an email and log when it was sent.
- 7,637
- 13
- 26
-
Is this a job you'd be willing to take on? – Stian Karlsen Sep 14 '16 at 09:46
-
In case I wasn't clear and you think I'm a bit entitled, I was suggested that we pay you, of course. Thanks! – Stian Karlsen Sep 14 '16 at 10:32
-
Hi Stian - yep no worries, I understood. In all honesty, I can't right now - a bit too busy with other things of my own I'm afraid! I'd be happy to help out in Slack if you're giving it a go - otherwise the slack #jobs channel should find you someone. – Jeremy Daalder Sep 14 '16 at 10:34
I made a plugin to do this thanks to Jeremy's above answer. It's my first Craft plugin BTW.
- 51
- 5