Rather than send a subscription request and get a failed response in the site logs. This patch checks to see current subscription of logged in user.
If user is already subscribed it will not display the fieldset for subscription.
Also for anonymous users it will still display the fieldset but it will validate upon form submission to see if email address entered into checkout form is currently subscribed. If it is then it just skips the step of subscribing the user to this newsletter.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | uc_mailchimp.subscribe-check2.diff | 1.54 KB | davidburns |
| uc_mailchimp.subscribe-check.diff | 2.07 KB | davidburns |
Comments
Comment #1
davidburnsNot sure if I should have used
or
in function uc_mailchimp_action_ecom_update($order) {...}
Comment #2
arcaneadam commentedI would check $order->primary_email as that is what will be available regardless of whether or not the user is logged in.
Comment #3
sethcohn commentedLooks good... can you submit a revised patch?
Comment #4
davidburnsupdated diff attached