I'd like to get some review on this simple checkout module. It provides the ability to prompt the user to subscribe to newsletters provided by simplenews during the checkout.
Steps to use:
1) install and setup simplenews with at least one newsletter.
2) download the attached simplenews_signup module to the ecommerce directory(or anywhere in your modules dir really)
3) enable simplenew_signup
4) browse to admin/store/settings/simplenews_signup and choose which options you would like to apply to your checkout.
5) add items to your cart, checkout, and see the subscription options on checkout/review
This is a very simple implementation and I'm open to suggestions for features. I'll be out of town for a couple days and not likely to be able to check this. When I get back, if the response is good, I'd be more than happy to commit this to contrib and maintain it.
| Comment | File | Size | Author |
|---|---|---|---|
| simplenews_signup.module | 3.65 KB | neclimdul |
Comments
Comment #1
gordon commentedI have taken a quick look, and here is a couple of things.
1. #submit is only called at the top level of the forms array.
2. the adding to the newsletter should be only done if the transaction occurs, eg presses the submit button, or the option should be given to put people onto the newsletter when the payment is completed.
I was also wondering if you should talk to the simplenews guys and submit it as a patch, instead of a module.
Comment #2
neclimdulthe submit was leftover from trying to hook into the form submit. The checkoutapi op handles that so that can just be deleted.
I'd be happy to modify the code to add subscriptions on payment complete but it does 2 things I was avoiding.
1) I'm going to have to store the subscription data until payment which means another table and provide a cron cleanup.
2) ugly cron work for handling on payment complete since I don't think we currently have such a hook in the paymentapi. plus this means subscriptions to newsletters would be delayed which might not be ideal in all situations.
I sent a msg to dries since he's marked as the maintaner but I got no response. I guess I can drop a not on their issue tracker and see if there is interest there in incorporating this into the module.
Comment #3
rickvug commentedThis is a usefule addition, I'll be trying it soon. Thanks and "bump" to this issue.
Comment #4
dado commented+1
any update?
Comment #5
rickvug commentedI just realized that I never replied about this... the module works great!
Comment #6
simehey james. want to do anything with this?
Comment #7
simefixing component
Comment #8
neclimdulI'm torn about it... I'm considering putting it in the tricks directory as some sort of code snippet or maybe some sort of contrib but hasn't seem to found home really with either package. Suggestions are welcome and I'm willing to maintain the code which ever way it goes.
Comment #9
rickvug commentedIMO this belongs in the ecommerce package because more people who use ecommerce will use simplenews than the other way around. The other option might just be to make this it's own project (like I think all ecommerce contrib modules should be, but that's another story) but the precedent has been set by all of the other contrib modules.
Comment #10
brmassa commentedsee http://drupal.org/node/162699