Subscribe to email list during Checkout with Drupal Commerce and MailChimp
The ability to communicate with your customers is essential when having an online store. One of the ways to do that is to send them valuable information through an email campaign.
The point of purchase
A customer that made the decision to purchase one of your product shows an interest your solution for the need that customer has. You can score double points if you are able to help them meet that need better than your competitor can. One of the ways to do that is by suggesting them that you will send them valuable information to their inbox that helps them meet their need - commonly known as the email newsletter. Your customer already made the decision to buy one of your products, let’s suggest an additional way to them that helps them meet their need: your very informative email campaigns a.k.a ‘subscribe to the email list’.
Subscribe during Drupal Commerce Checkout
This is what the actual result will look like: a subscription checkbox that allows a customer to signup to your newsletter during checkout.
Note that once the customer is signed up to your list, they won’t be presented with this option any longer during other orders - if they are logged-in that is.
Now let’s have a look at how we set that up in Drupal.In case you’re wondering how I got the neat looking checkout theming: that’s the Omega Kickstart theme included in the Commerce Kickstart distribution.
Configuring Drupal Commerce
I’m assuming you’ve configured the basics for your Commerce MailChimp module. If not: do that first. You can learn how to do that in my tutorial on setting up the Commerce MailChimp module.Now let’s configure the rest:
Configuring the Checkout Subscription Options Pane
First go to Drupal Commerce checkout settings, it is located atexample.com/admin/commerce/config/checkout.You will be presented with with a screen that looks like this:
Note the ‘Subscription Options’ pane.The position on this page shows where it will appear on the order checkout pane. Drag it up and down to change its position, and don’t forget to hit the ‘Save Configuration’ when you do.
The next step is to configure the ‘Subscription Options pane’ itself. Click ‘configure’ in that same row. You will be presented with ‘regular’ checkout pane configuration options like these:
However, Commerce MailChimp module adds extra Checkout pane configuration options. All the MailChimp lists that you configured with the MailChimp module will be listed here. In the screenshot the MailChimp list is configured as ‘test_list’ in Drupal MailChimp module.Now click on ‘test_list List Settings’ (in your case this will show ‘[your] List Settings’).
It will show you options like these:
Check the box to enable the list on the Checkout pane.
Default Value for subscription checkbox
Select which default subscription value you like to show to your customers.
Force Checkbox
Checking this box allows you to force the customer to signup to your list. The customer is not allowed to proceed if the box is not checked. If they do try to proceed with the ‘Force signup’ setting checked, they will be greeted with a form error message like below.
Checkbox label
The ‘checkbox label’ alows you to configure the text you’d like to present next to the subscription checkbox during checkout.
Checkbox description
The text you put in the ‘checkbox description’ field will show underneath the checkbox label. You can explain a bit more about what your customers will get when they signup.
Don’t forget to save your configuration and start testing your essential usecases.
That's it, you're done. The subscription form should now appear during checkout. As a bonus Drupal Commerce order data will be attached to the users MailChimp profile when they order something from your Drupal Commerce store. If you're interested helping your customers, think about sending targeted email regarding their product purchases. You can learn how to set that up in my article about Segmenting your email campaign based on Drupal Commerce product purchases. You can also use Drupal Commerce shopping data to measure MailChimp campaign sales. Learn about how to set that up in my article about Measuring email campaign sales with Drupal Commerce and MailChimp.
Category: