Hi,

Thanks to the Satchmo team for a fine application.

I want to edit the payment_choices list using the
payment_methods_query signal. I've set up a listener which is getting
called ok. But simply changing the 'methods' list does not make any
effect.

The comment in PaymentMethodForm says that our listener can modify the
methods list if necessary however modifying it from the listener does
not change the payment_choices list. I don't think that it would be
possible to alter the list from the listener?

        # Send a signal to perform additional filtering of available
payment methods.
        # Receivers have cart/order passed in variables to check the
contents and modify methods
        # list if neccessary.
        payment_choices = labelled_gateway_choices()
        print 'SATCHMO 1', payment_choices
        signals.payment_methods_query.send(
                PaymentMethodForm,
                methods=payment_choices,
                cart=cart,
                order=order,
                contact=self._contact
                )
        print 'SATCHMO 2', payment_choices # same as above

My listener:

def virtual_payment_options(sender, signal=None, contact=None,
cart=None, order=None,
        methods=[]):
    # change the methods list here
    print methods # changed

However, I've managed to achieve the desired result using the
`form_init` listener of PaymentContactInfoForm.

Thanks,
Darryl

-- 
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