Get order object using order id

View: New views
8 Messages — Rating Filter:   Alert me  

Get order object using order id

by Hannes Calitz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hey guys

This is probably a very simple question, but I need to find out how to
return the order object by using the order id (which I retrieved from
a query string). Any help would be greatly appreciated.

Thanks
Hannes
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Get order object using order id

by duffyd :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Hannes,

    order_manager = getUtility(IOrderManager)
    order = order_manager.get(yourOrderID)

Thanks,
Tim

On Tue, 2009-05-19 at 23:25 -0700, hannesc wrote:
> Hey guys
>
> This is probably a very simple question, but I need to find out how to
> return the order object by using the order id (which I retrieved from
> a query string). Any help would be greatly appreciated.
>
> Thanks
> Hannes
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Get order object using order id

by Hannes Calitz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thanks

However, when I send the order id to the order manager, it returns
'None'. Here is the code I'm using:

        order_manager = component.getUtility(interfaces.IOrderManager)
        orderid = self.getQuerystring()
        if order_manager.isValid(orderid):
            order = order_manager.get(orderid)
        else:
            order = "invalid"

Now, as you can see from the above code, I am checking whether the
orderid I receive is valid. When the id is validated, it is supposed
to set order to the order object. However, order_manager.get(orderid)
returns 'None'.

Any idea why this could be happening?

H

On May 20, 8:36 am, Tim Knapp <duf...@...> wrote:
> Hi Hannes,
>
>     order_manager = getUtility(IOrderManager)
>     order = order_manager.get(yourOrderID)
>
> Thanks,
> Tim
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Get order object using order id

by Rob LaRubbio-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Do you know what self.getQuerysring is returning?  My guess is that it is not returning just the order id.  Maybe something like &order-id=<your order id> or a dict?

-Rob

On Sun, May 24, 2009 at 10:05 PM, hannesc <hannesc@...> wrote:

Thanks

However, when I send the order id to the order manager, it returns
'None'. Here is the code I'm using:

       order_manager = component.getUtility(interfaces.IOrderManager)
       orderid = self.getQuerystring()
       if order_manager.isValid(orderid):
           order = order_manager.get(orderid)
       else:
           order = "invalid"

Now, as you can see from the above code, I am checking whether the
orderid I receive is valid. When the id is validated, it is supposed
to set order to the order object. However, order_manager.get(orderid)
returns 'None'.

Any idea why this could be happening?

H

On May 20, 8:36 am, Tim Knapp <duf...@...> wrote:
> Hi Hannes,
>
>     order_manager = getUtility(IOrderManager)
>     order = order_manager.get(yourOrderID)
>
> Thanks,
> Tim



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Get order object using order id

by Hannes Calitz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On inspection while debugging I found that it is returning the order id as a string (eg. 373715280).

2009/5/25 Rob LaRubbio <larubbio@...>
Do you know what self.getQuerysring is returning?  My guess is that it is not returning just the order id.  Maybe something like &order-id=<your order id> or a dict?

-Rob


On Sun, May 24, 2009 at 10:05 PM, hannesc <hannesc@...> wrote:

Thanks

However, when I send the order id to the order manager, it returns
'None'. Here is the code I'm using:

       order_manager = component.getUtility(interfaces.IOrderManager)
       orderid = self.getQuerystring()
       if order_manager.isValid(orderid):
           order = order_manager.get(orderid)
       else:
           order = "invalid"

Now, as you can see from the above code, I am checking whether the
orderid I receive is valid. When the id is validated, it is supposed
to set order to the order object. However, order_manager.get(orderid)
returns 'None'.

Any idea why this could be happening?

H

On May 20, 8:36 am, Tim Knapp <duf...@...> wrote:
> Hi Hannes,
>
>     order_manager = getUtility(IOrderManager)
>     order = order_manager.get(yourOrderID)
>
> Thanks,
> Tim






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Get order object using order id

by Lucie Lejard-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


what does the order_manager.isValid method do? Does it expect a string
with the order id number?

--
S i x  F e e t  U p ,  I n c .  |  http://www.sixfeetup.com
Phone: +1 (317) 861-5948 x605
ANNOUNCING the first Plone Immersive Training Experience | Sept. 10-11-12, 2009
http://www.sixfeetup.com/immerse



On Tue, May 26, 2009 at 5:31 AM, Hannes Calitz <hannesc@...> wrote:

> On inspection while debugging I found that it is returning the order id as a
> string (eg. 373715280).
>
> 2009/5/25 Rob LaRubbio <larubbio@...>
>>
>> Do you know what self.getQuerysring is returning?  My guess is that it is
>> not returning just the order id.  Maybe something like &order-id=<your order
>> id> or a dict?
>>
>> -Rob
>>
>> On Sun, May 24, 2009 at 10:05 PM, hannesc <hannesc@...> wrote:
>>>
>>> Thanks
>>>
>>> However, when I send the order id to the order manager, it returns
>>> 'None'. Here is the code I'm using:
>>>
>>>        order_manager = component.getUtility(interfaces.IOrderManager)
>>>        orderid = self.getQuerystring()
>>>        if order_manager.isValid(orderid):
>>>            order = order_manager.get(orderid)
>>>        else:
>>>            order = "invalid"
>>>
>>> Now, as you can see from the above code, I am checking whether the
>>> orderid I receive is valid. When the id is validated, it is supposed
>>> to set order to the order object. However, order_manager.get(orderid)
>>> returns 'None'.
>>>
>>> Any idea why this could be happening?
>>>
>>> H
>>>
>>> On May 20, 8:36 am, Tim Knapp <duf...@...> wrote:
>>> > Hi Hannes,
>>> >
>>> >     order_manager = getUtility(IOrderManager)
>>> >     order = order_manager.get(yourOrderID)
>>> >
>>> > Thanks,
>>> > Tim
>>>
>>
>>
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Get order object using order id

by Hannes Calitz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey there Lucie

I went to go check in getpaid.core, and all it really does is check whether the id is an integer. I did however sort out this problem yesterday. I somehow forgot to actually 'store' the order before redirecting. LOL

I have completed the payment processor, and it should be in the repository sometime during the course of the day.

2009/5/28 Lucie Lejard <lucielejard@...>

what does the order_manager.isValid method do? Does it expect a string
with the order id number?

--
S i x  F e e t  U p ,  I n c .  |  http://www.sixfeetup.com
Phone: +1 (317) 861-5948 x605
ANNOUNCING the first Plone Immersive Training Experience | Sept. 10-11-12, 2009
http://www.sixfeetup.com/immerse



On Tue, May 26, 2009 at 5:31 AM, Hannes Calitz <hannesc@...> wrote:
> On inspection while debugging I found that it is returning the order id as a
> string (eg. 373715280).
>
> 2009/5/25 Rob LaRubbio <larubbio@...>
>>
>> Do you know what self.getQuerysring is returning?  My guess is that it is
>> not returning just the order id.  Maybe something like &order-id=<your order
>> id> or a dict?
>>
>> -Rob
>>
>> On Sun, May 24, 2009 at 10:05 PM, hannesc <hannesc@...> wrote:
>>>
>>> Thanks
>>>
>>> However, when I send the order id to the order manager, it returns
>>> 'None'. Here is the code I'm using:
>>>
>>>        order_manager = component.getUtility(interfaces.IOrderManager)
>>>        orderid = self.getQuerystring()
>>>        if order_manager.isValid(orderid):
>>>            order = order_manager.get(orderid)
>>>        else:
>>>            order = "invalid"
>>>
>>> Now, as you can see from the above code, I am checking whether the
>>> orderid I receive is valid. When the id is validated, it is supposed
>>> to set order to the order object. However, order_manager.get(orderid)
>>> returns 'None'.
>>>
>>> Any idea why this could be happening?
>>>
>>> H
>>>
>>> On May 20, 8:36 am, Tim Knapp <duf...@...> wrote:
>>> > Hi Hannes,
>>> >
>>> >     order_manager = getUtility(IOrderManager)
>>> >     order = order_manager.get(yourOrderID)
>>> >
>>> > Thanks,
>>> > Tim
>>>
>>
>>
>>
>
>
> >
>




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Get order object using order id

by Lucie Lejard-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


great!
--
S i x  F e e t  U p ,  I n c .  |  http://www.sixfeetup.com
Phone: +1 (317) 861-5948 x605
ANNOUNCING the first Plone Immersive Training Experience | Sept. 10-11-12, 2009
http://www.sixfeetup.com/immerse



On Thu, May 28, 2009 at 11:52 PM, Hannes Calitz<hannesc@...> wrote:

> Hey there Lucie
>
> I went to go check in getpaid.core, and all it really does is check whether
> the id is an integer. I did however sort out this problem yesterday. I
> somehow forgot to actually 'store' the order before redirecting. LOL
>
> I have completed the payment processor, and it should be in the repository
> sometime during the course of the day.
>
> 2009/5/28 Lucie Lejard <lucielejard@...>
>>
>> what does the order_manager.isValid method do? Does it expect a string
>> with the order id number?
>>
>> --
>> S i x  F e e t  U p ,  I n c .  |  http://www.sixfeetup.com
>> Phone: +1 (317) 861-5948 x605
>> ANNOUNCING the first Plone Immersive Training Experience | Sept. 10-11-12,
>> 2009
>> http://www.sixfeetup.com/immerse
>>
>>
>>
>> On Tue, May 26, 2009 at 5:31 AM, Hannes Calitz <hannesc@...> wrote:
>> > On inspection while debugging I found that it is returning the order id
>> > as a
>> > string (eg. 373715280).
>> >
>> > 2009/5/25 Rob LaRubbio <larubbio@...>
>> >>
>> >> Do you know what self.getQuerysring is returning?  My guess is that it
>> >> is
>> >> not returning just the order id.  Maybe something like &order-id=<your
>> >> order
>> >> id> or a dict?
>> >>
>> >> -Rob
>> >>
>> >> On Sun, May 24, 2009 at 10:05 PM, hannesc <hannesc@...> wrote:
>> >>>
>> >>> Thanks
>> >>>
>> >>> However, when I send the order id to the order manager, it returns
>> >>> 'None'. Here is the code I'm using:
>> >>>
>> >>>        order_manager = component.getUtility(interfaces.IOrderManager)
>> >>>        orderid = self.getQuerystring()
>> >>>        if order_manager.isValid(orderid):
>> >>>            order = order_manager.get(orderid)
>> >>>        else:
>> >>>            order = "invalid"
>> >>>
>> >>> Now, as you can see from the above code, I am checking whether the
>> >>> orderid I receive is valid. When the id is validated, it is supposed
>> >>> to set order to the order object. However, order_manager.get(orderid)
>> >>> returns 'None'.
>> >>>
>> >>> Any idea why this could be happening?
>> >>>
>> >>> H
>> >>>
>> >>> On May 20, 8:36 am, Tim Knapp <duf...@...> wrote:
>> >>> > Hi Hannes,
>> >>> >
>> >>> >     order_manager = getUtility(IOrderManager)
>> >>> >     order = order_manager.get(yourOrderID)
>> >>> >
>> >>> > Thanks,
>> >>> > Tim
>> >>>
>> >>
>> >>
>> >>
>> >
>> >
>> > >
>> >
>>
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---