Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 2 of 2

Thread: Ramifications of converting the ExtensionData fields to xml datatype

  1. #1
    lhanssen is offline Junior Member
    Join Date
    Feb 2010
    Posts
    2

    Default Ramifications of converting the ExtensionData fields to xml datatype

    I'm thinking of storing custom product variant attributes as xml in the ProductVariant > ExtensionData fields in the database. The fields are currently ntext datatype and I'd like to change it to xml datatype to make it easier to deal with from a sql perspective.

    Since I'm just getting started on my customizations and haven't yet done a product import using Excel spreadsheet, I'm wondering if making that change would cause problems with existing processes in the software and cause already built stored procedures to not work properly.

    Can anyone comment on this strategy and whether I should just leave them as ntext datatype.

    Thanks.

  2. #2
    WebDev_Ben is offline Junior Member
    Join Date
    Aug 2009
    Posts
    1

    Default

    I too am using Extension Data for additional product attributes but I did not change the data type in the database to accommodate it.

    Here's how I did it:

    My format when I add it to StoreFront using the WSI:

    <ExtensionData>
    <![CDATA[
    <Data>
    <InnerCase>12</InnerCase>
    <OuterCase>24</OuterCase>
    </Data>
    ]]>
    </ExtensionData>

    The runtime data returned in the XmlPackage:

    <ExtensionData>&lt;Data&gt;&lt;InnerCase&gt;12&l t;/InnerCase&gt; &lt;OuterCase&gt;24&lt;/OuterCase&gt;&lt;/Data&gt;</ExtensionData>

    In the XmlPackage, use this function to get your data:

    <xsl:value-of select="aspdnsf:XmlStringAsXml(ExtensionData, 'Data/OuterCase')" />

    Hope that helps!

    -Ben