Sorry I'm late to responding to this. It's definitely a bug. My
recommendation would be to check if they are subscribed and then set the
variable based on that result.

If you're still having trouble getting it to work, please open a ticket with
details and we'll see if we can figure out a good solution.

-Chris

On Tue, Aug 31, 2010 at 7:39 AM, Howery <[email protected]> wrote:

> After trying to track this down some more I have found out why it is
> unsubscribing from the newsletter, but not so much of how to stop it.
>
> In the newsletter listener, the "contact_form_listener" has the
> following if statement:
>
> if 'newsletter' not in formdata:
>        subscribed = False
>    else:
>        subscribed = formdata['newsletter']
>
> There is not any newsletter in the form data from the first step of
> checkout where you verify addresses and such. So the listener is
> automatically setting the subscribed = False.
>
> Would it be better to add the newsletter to the form data as a hidden
> field in the checkout process?? or to rewrite the listener to check if
> the email is already subscribed? perhaps with the
> newsletter.email_is_subscribed(cls, email) from the newsletter model?
> and then pass the results of that test? I have tried to do this, but
> couldn't get it to work. I am still trying to figure out how signals
> work in general.
>
> Thanks for any help.
>
> On Aug 28, 12:50 pm, Howery <[email protected]> wrote:
> > I've setup Satchmo to use Mailman for the newsletter. and it is
> > working fine. when the user updates their profile it will subscribe or
> > unsubscribe them correctly.
> > However I have found that when a user that checks out a shopping cart
> > it unsubscribes them from the newsletter. It happens when they confirm
> > their information before going to the select shipping step.
> >
> > Satchmo.log shows this:
> >
> > Sat, 28 Aug 2010 10:23:48 satchmo_store.contact.forms INFO     Sending
> > form_init signal: <class 'payment.forms.PaymentContactInfoForm'>
> > Sat, 28 Aug 2010 10:23:49 satchmo_store.contact.forms DEBUG    Saving
> > contact info for David Howery
> > Sat, 28 Aug 2010 10:23:49 newsletter.listeners DEBUG    Updating
> > newletter subscription for David Howery to False
> > Sat, 28 Aug 2010 10:23:49 newsletter   DEBUG    Updating subscription
> > status from True to False for David Howery
> >
> > I am at a loss on how to stop it from triggering the newsletter status
> > change. Any suggestions?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Satchmo users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<satchmo-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/satchmo-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/satchmo-users?hl=en.

Reply via email to