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

Thread: ExtensionData in a category

  1. #1
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default ExtensionData in a category

    What is the structure to add extension data to a category using WSI?

    Code:
    <Mappings AutoCleanup="boolean" PreserveExistingRecords="True">
    <Entity EntityType="Category" XPath="/cat/cat-1" DisplayOrder="1" />
    <Entity EntityType="Category" XPath="/cat/cat-2" DisplayOrder="1" />
    <Entity EntityType="Category" XPath="/cat/cat-3" DisplayOrder="1" />
    
    </Mappings>

    Thanks

  2. #2
    George the Great is offline Senior Member
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Default

    You won't be able to add extension data to the categories if the categories are being added via the XPath in a product mappings node (like the snippet you have posted here). However, you can later reference the category using the XPathLookup like you've specified in the product mappings
    Code:
    <Entity EntityType="Category" XPathLookup="/cat/cat-1" Action="Update">
      <ExtensionData>Your ExtensionData here...</ExtensionData>
    </Entity>
    or you can add when you create the entities outside of the products
    Code:
    <Entity EntityType="Category" Action="Add">
      <Name>Category Name</Name>
      ...
      ...
      <ExtensionData>Your ExtensionData here...</ExtensionData>
      ...
      ...
    </Entity>
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>

  3. #3
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    Perfect, thanks George.