OKay I'm seeing the custom signal on the DownloadableProduct (line 1567 in
product/models.py).

My question is, "now what?"

First a brief history/goal of our intentions:
Upon a successful order, we need to spit out a custom xml file that
represents that order.  (An hourly job will then process those orders and
run then through an SAP backend).  Our signal code connects a method called
sap_export which is responsible for creating this file.  Currently two of
these files get generated, as you know, so we've worked around that issue
and while it works, we feel there's a "better way."

So, having said that, are you saying that perhaps rather then registering
new method with the order_success signal, that we simply put our file
creation code into a method call order_success on our custom product model?
Therefore when order_success is fired (from line 917 that you specified
earlier) as it loops over subtypes with an order_success method, it will
call that code?

Basically we don't need our signal anymore but a method called order_success
that will do the same thing our signal method did...

Am I even close?




On Tue, Oct 13, 2009 at 9:35 PM, Chris Moffitt <[email protected]> wrote:

> Take a look at the downloadable product in Satchmo. That uses a custom
> order_success signal. In that instance, the product subtype is supplied so
> you could alter behavior based on the type of product.
>
> -Chris
>
>
> On Tue, Oct 13, 2009 at 8:24 PM, lifewithryan <[email protected]>wrote:
>
>> I'll have my teammate check that out.  We are using an a custom product
>> that extends satchmo's product.  So it sounds like you are saying tha the
>> signal gets fired for the custom product and it's parent ( satchmo product)?
>>
>> Any suggestions ifthat is the case?  We do have a work around in place but
>> wnated to see if there was a root cause that we could fix.
>>
>> Sent from my iPod
>>
>> On Oct 13, 2009, at 7:00 PM, Chris Moffitt <[email protected]> wrote:
>>
>> In looking at the code a little bit (satchmo_store/shop/models.py) around
>> line 917, you'll see that order_success is called for each subtype that has
>> the attribute order_success. Are you using a custom product?
>>
>> I suspect this is what you're seeing. Is this consistent with what you see
>> in the log file too?
>>
>> When the signal is called, do the values of the variables you receive
>> change?
>>
>> -Chris
>>
>> On Tue, Oct 13, 2009 at 5:04 PM, lifewithryan < <[email protected]>
>> [email protected]> wrote:
>>
>>>
>>> We disabled our custom payment module and still seeing that the
>>> order_success signal is getting called more than once.
>>>
>>> We also have the UPS module enabled as well as tiered shipping.  Can
>>> you think of anyting else we can look at to try and figure out why
>>> order_success would be getting called twice for one order?
>>>
>>>
>>>
>>> On Oct 7, 6:25 am, lifewithryan <[email protected]> wrote:
>>> > Custom paypal website payments pro that we actually submitted back to
>>> > bitbucket for you
>>> >
>>> > Sent from my iPod
>>> >
>>> > On Oct 6, 2009, at 7:05 PM, Chris Moffitt <[email protected]> wrote:
>>> >
>>> > > Seems strange. What payment module are you using?
>>> >
>>> > > -Chris
>>> >
>>> > > On Tue, Oct 6, 2009 at 2:54 PM, lifewithryan
>>> > > <[email protected]> wrote:
>>> >
>>> > > I have a developer on  my team who is using the order_success signal
>>> > > to output an xml file that our SAP backend will the pick up.
>>> >
>>> > > However, it appears order_success is getting called twice from what
>>> we
>>> > > can tell and we are therefore getting two order files instead of one
>>> > > per order.  Below is a copy of the text he's sent me explaining the
>>> > > scenario:
>>> >
>>> > > I have one method defined in models.py which takes the Order object
>>> > > passed to it (sender), extracts information from it, formats this
>>> > > information into xml templates using the Django templating system,
>>> > > then saves the output xml to a file. Immediately after the method is
>>> > > defined, the method is registered as a handler for the
>>> "order_success"
>>> > > signal using the syntax "order_success.connect(method)." This occurs
>>> > > only once in the source. Upon completing an order, two separate xml
>>> > > files are generated. Both are identical, except for the file's name
>>> > > which is generated based on a md5 hash of the file salted with the
>>> > > current unix timestamp. It appears that the signal is being called
>>> > > twice upon completion of the order. As far as I am aware, this is not
>>> > > the correct behavior since the balance should only go to zero at one
>>> > > point in the transaction.
>>> >
>>> > > Any ideas??
>>>
>>>
>>
>>
>>
>>
>>
>
> >
>


-- 
http://www.sudovi.com/
http://www.twitter.com/lifewithryan
http://www.thecommontongue.com
http://www.lifewithryan.com/

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