A custom payment method app?
Enviado desde il mio orto
-----Mensaje original-----
De: Dan
Enviados:  07/29/2011 04.26.06
Asunto:  Re: Reward Point System

Hi thanks for your reply, I am using the signals to add points to the
customer account just struggling with the checkout process and
allowing customers to redeem their points...


On Jul 28, 12:11 am, Kevin Harvey <[email protected]> wrote:
> Dan, have you looked at the signals in satchmo_store.shop.signals? You could
> probably use one of the signals in there to fire your 
> code.https://bitbucket.org/chris1610/satchmo/src/8d05533bdfb6/satchmo/apps...
>
> I haven't done this in any version of Satchmo past 0.9-pre, but the
> principals should be the same. The code in your rewards app views might look
> like this:
>
> from satchmo_store.shop import signals
> from threaded_multihost import threadlocals
>
> # import other stuff
>
> def reward_point_listener(signal, **kwargs):
>     # here are some helpful variables
>     user = threadlocals.get_current_user()
>     cart = kwargs['cart']
>
>     # do some stuff, like update your
>     # rewards point model, send an email, etc.
>
> # set the listener to fire when Satchmo sends the
> # order_success signal (use any signal in
> # satchmo_store.shop.signals)
> signals.order_success.connect(reward_point_listener)

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


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