Is data_text_2 attribute of ezorder used?

Author Message

Bruce Morrison

Sunday 11 March 2007 9:58:12 pm

Howdy

I'm working on an payment gateway and am looking for a place to store response information from the gateway. I've noticed that the ezorder object has 2 data_text fields. The first has been used for storing account_information (eZSimpleShopAccountHandler).

I've searched the code but have found no existing reference to this attribute apart from the defination of eZOrder. Can it be used to store information or does it serve some other purpose?

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

kracker (the)

Sunday 11 March 2007 11:12:12 pm

I've not seen much use of data_text_2 attribute in ezorder.

In theory you might be able to store your additional information within the data_text_1 attribute . This attribute is used for storage of shop_account handler information related to the customer and the order within an xml document. You might be able transparently add additional xml documents to the entire attribute as they seem to only deal with the document they know about... this area seems open to expansion within the attribute it'self.

I can't explain it but I know it's (data_text_2) reserved for future use to store extended information (perhaps similar to data_text_1) related to the order. To date I've avoided using it as there are are other options at hand (above and below).

More and more I seem to think that additional information related to an order should be stored external to the ezorder storage ... perhaps inside another form of persistent object related to transaction more so as you can have many transactions per order or per customer. Where doing this inside of ezorder has inherent limitations which a separate model for transactions seems ... simpler.

This said. There are lots of opportunities and options depending on your own take on how to provide your functionality.

<i>//kracker

kmk - elevated sounds ...</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Bruce Morrison

Sunday 11 March 2007 11:43:10 pm

Hi kracker

Thanks for the reply.

I can't explain it but I know it's (data_text_2) reserved for future use to store extended information (perhaps similar to data_text_1) related to the order.

Pretty cryptic :) Can you explain where you have recieved this information from or elaborate at all?

I've considered and discounted storing the info in data_text_1 as I'm using that for the account info and it doesn't make sense (to me at least) to mix this infomation.

I was considering using data_text_2 to store the info encapulated in XML with associated metadata( date, time etc) - this would allow for multiple tranactions. Creating a table & a persistant object class is also an option I've considered.

Where doing this inside of ezorder has inherent limitations...

Aside from the data_text_2 being reserved for futuer use, what limitations are you aware of?

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

kracker (the)

Monday 12 March 2007 12:25:03 am

<i> > Hi kracker, Thanks for the reply.</i>

No worries

<i> >> I can't explain it but I know it's (data_text_2) reserved for future use to store extended information (perhaps similar to data_text_1) related to the order.</i>

<i> > Pretty cryptic :) Can you explain where you have received this information from or elaborate at all? </i>

Sadly I can not. I know I read a lot of obscure details in the code and in conversation. I'm sure others can relate to not really knowing why they know something obscure ... If I was to try to find more on this answer I would have to spend a lot of time back tracking through various public resources :\

<i> > I've considered and discounted storing the info in data_text_1 as I'm using that for the account info and it doesn't make sense (to me at least) to mix this information.</i>

Except that you over look the notion that the shop_account handler xml stored in data_text_1 is self contained. Meaning you can store say a second shop_account handler xml document (also still both self contained and separate) within the data_text_1 attribute.

So ... they don't mix. Or at least that was the idea at the start of the thread ...

They might share a storage location but this still seems to provide for a stack of separate sets of information (the same you want to store in data_text_2) can be stored in data_text_1 without causing conflict with existing classes which depend on this attribute data_text_1.

I'm ready to be wrong :\

<i> > I was considering using data_text_2 to store the info encapsulated in XML with associated metadata( date, time etc) - this would allow for multiple transactions. Creating a table & a persistent object class is also an option I've considered.</i>

But fetching information from this location (multiple transactions) prolly means parsing a lot of xml to simply get to the information surrounding storing variable content inside of xml inside of data_text_2 (or any). It's a number of layers and I think Paynet does this very much differently (if that is any guide) ...

<i> >> Where doing this inside of ezorder has inherent limitations...</i>

<i> > Aside from the data_text_2 being reserved for future use, what limitations are you aware of?</i>

I see none. I think would be perfectly acceptable for a one off implementation, it might not ever become a real problem.

<i>//kracker

Modest Mouse - Never Ending Math Equation</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Bruce Morrison

Monday 12 March 2007 1:03:37 am

Hi kracker

I'm pushing the point on this because I took you initial response to mean that the <i>knew for certian</i> that is was reserved but couldn't elaborate for some reason.

The code that I've looked at and the documentation* don't indicate that it's reserved. I've also searched through the eZ domain & the code base for references to data_text_2 where eZOrder is referenced without finding any indication they are reserved or used by any code. Are there other public resources I should look?

I'm wondering if this is something you "believe" or something you "know".

I understand what you are saying about storing both the account information & gateway response in the same XML structure within data_text_1 and while this is technically doable I've made an architectural decision (not technical) that they shouldn't be stored in the same location.

I'm still tossing up if data_text_2 is the right place to store this information, but it would be good to know if data_text_2 is off limits or not.

Cheers
Bruce

* http://ez.no/doc/ez_publish/technical_manual/3_8/reference/objects/ezorder

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.