-3

This is a tricky request and I cant get my head around it completely.

A restaurant delivers only to certain districts within town each day (on an irregular schedule). The webpage shows the next 7 days and for each days the districts for this day. That's up and running.

But people should be notified that the next day its their districts turn, so they dont forget to order (which they do at the moment).

I am thinking of a subscription form where visitors only have to leave their email adress and click their district. Like a newsletter subscription. They should NOT register into Drupal. There are several paths to choose from, but with everyone I tried there was one piece missing.

One could choose Mailchimp with the districts as groups or lists and have the subscribers per district there. But how would Mailchimp know that tomorrow district X will be served and it should send out the mailing.

Tried to get it done with a webform including a term reference to the districts (which are a taxonomy vocabulary), then using Rules to check the the upcoming days districts to the webform submissions term references with the same value. No luck so far.

Simplenews might be an option, but it seems it doesnt have the capability to ad a term reference field to subscribers.

Anyone having an idea, I am eager to listen to everyone.

thanks in advance

ps: all in Drupal 8

0

Assuming that each person is a representative for only one district, you basically have several different mailing lists-- one for each district.

So if you are using a mailing list like Mailchimp, you need to set up a different list for each district and then let people sign up to each list.

Doing this with a single list and filtering the list is going to get really complicated because what you actually seem to want to do is to send out emails per district, so in that case, each district should be its own list.

If you implement this another way within Drupal, it's the same-- create separate lists of people per district, and then your email sending logic should handle each district.

But how would Mailchimp know that tomorrow district X will be served and it should send out the mailing.

In Mailchimp, you can set a list to send out an email once a week on a certain day of the week, etc. You could alternately configure Drupal to tell Mailchimp to send out the mails using the Mailchimp API, but that's a complex topic not suitable for a general answer to this question.

5
  • Yeah, thanks. I'd rather solve in Drupal without Mailchimp. If possible. – Matthias Feb 12 at 7:58
  • @Matthias Then do it in Simplenews. Create a mailing list for each district and then let users subscribe to the list for their district. – Patrick Kenny Feb 12 at 8:04
  • Ja, would be an option. But the desired automated mailing one day ahead is the tricky thing then. And I dont see an option to add fields to simplenews subscribers to reference them to the districts. because there should only be one subscription form with ceckboxes for the districts – Matthias Feb 12 at 9:53
  • @Matthias If you take that approach, you will have to write custom code. As I said, I think the easiest way to do this is to create lists per district, whether in Simplenews or Mailchimp. If you need one signup form but lists per district, then you will have to write custom code for that signup form. – Patrick Kenny Feb 12 at 10:50
  • still thinking, it should be working with webform and rules IF I could get a rule working that goes like Cron runs and rule checks which districts are to be served tomorrow If tomorrows district (in a node with a date field) = district info in webform subscriber then send email to all webform subscribers with this district – Matthias Feb 12 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.