Ubercart Simplenews Integration


I have written a simple module which adds a Simplenews newsletter subscribe checkbox to the Ubercart checkout process. This module is tested and works with Ubercart 6.x-2.0-rc6 and Simplenews 6.x-1.0-rc6. It uses an combination of hook_checkout_pane() and simplenews_subscribe_user() to achieve the objective.

It's very basic in the sense that it will subscribe the user to one newsletter (the primary newsletter), and if the client is already subscribed the checkbox still appears. It works for both anonymous and user logged-in checkouts. However the user is subscribed when pressing the 'Review Order' so if they review their order, then click the 'Back' button and untick the box, they will still be subscribed Smiling Not ideal, but it's fine for my purposes.

I think the module was a bit too simple to put on the main Drupal site (my application for a CVS account was rejected Smiling so I'll put it here instead.

Hopefully others will find this useful.

simplenews_ubercart.zip2.27 KB
J. Ayen Green's picture
Joined: 06/25/2009
Juice: 184
Re: Ubercart Simplenews Integration

Where is the module?!

willeaton's picture
Joined: 05/06/2008
Juice: 65

I've created a working module/integration for this http://www.ubercart.org/contrib/13845. Could be quite similar but from what I can see, the above isn't quite working.

afestein's picture
Joined: 09/15/2009
Juice: 25
Re: Re: Ubercart Simplenews Integration

Sorry, I forgot to include the attachment... have fixed.

qrios's picture
Cool profile pic award.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 554
Opt in

Hi, thanks for this module. Works as advertised. The t() patch is fine.
Shouldn't the checkbox be off by default? European laws demand "opt-in". Strictly seen, setting the checkbox on by default might be an issue, since visitors are not explicitly saying "yes".
See also: http://ec.europa.eu/information_society/eyouguide/fiches/4-ii-a/index_en...



neovalis's picture
Joined: 07/10/2010
Juice: 11

I'm having a hard time getting this to work.
I created a folder in /sites/all/modules/ and placed the contents of the zip file there.
I can see no options.
The feature has not appeared in checkout.

You'll have to excuse me I'm not entirely familiar with drupal's module system.


neovalis's picture
Joined: 07/10/2010
Juice: 11

My problem was solved by enabling the module. *forehead slap*


mkmk's picture
Joined: 05/10/2010
Juice: 37
Re: Ubercart Simplenews Integration

"It's very basic in the sense that it will subscribe the user to one newsletter (the primary newsletter), "

So, if there are multiple newsletters available, will the user see a checkbox for each one and choose which ones they want to subscribe to ?

Can an administrator define defaults for these checkboxes, such as the defaults provided by the simplenews_register module ?

joachim@drupal.org's picture
Joined: 10/16/2008
Juice: 31
Re: Ubercart Simplenews Integration

This doesn't allow for multiple newsletters...

Also, I don't think looking in $_POST can be the right thing. Won't form values be in $arg2?

Got a link to your d.org CVS application? There's no such thing as 'too simple', really, and this module is a useful piece of integration. I can review your application again if you like.

jimboo's picture
Joined: 01/04/2011
Juice: 54

I started with this, then tried uc_newsletter and finally added my own uc_subscribe to get round the issues I found.

eric's picture
Joined: 11/25/2007
Juice: 82
NOT working


I installed this module but it does not seems to work.

I can see this on the check out page after I enable this module.

Newsletter subscription
Would you like to subscribe to our newsletter?
Yes, I would like to receive your newsletter

I tried to check out and tick the YES box.
However, after check out is completed, I check the account's newsletter subscription and found it is empty.
The only newsletter on the site is not subscribed to it...

I tried "Subscribe/unsubscribe pane for ubercart checkout and simplenews" as well but that does NOT appear to work either.

I tried "Subscribe to Newsletter" and it WORKS, so I will use that instead....

I am currently using
Ubercart 6.x-2.6
Simplenews 6.x-1.3
as well as other modules....

I think this module may need some work to fix the bug...


clavigne's picture
Joined: 04/25/2010
Juice: 25
Re: Ubercart Simplenews Integration

Use of this module with Simplenews 6.x-2.0-alpha3 results in following error after installation:

Fatal error: Call to undefined function simplenews_block_form() in path/to/site/sites/all/modules/uc_newsletter/uc_newsletter.module on line 27