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: mapping product to multiple categories

  1. #1
    chana is offline Junior Member
    Join Date
    Jun 2010
    Posts
    25

    Default mapping product to multiple categories

    my client wants the ability to map a product to multiple categories.

    I tried to do it within the product add/update. I have this existing code:

    Code:
    <Mappings AutoCleanup='True'>
    
    <Entity EntityType='Category' XPath=' xxx/yyy/zzz' DisplayOrder = '1'/>");
    
     </Mappings>
    Adding it here did not work. The second category overwrote the first.

    So I'd like to do it using a separate mapping node :

    Code:
    <Mapping Action="Add|Delete" EntityType="Manufacturer|Distributor|Category|Section|Genre|Vector" EntityID="integer" EntityGUID="uniqueidentifier" ObjectType="Product" ObjectID="integer" ObjectGUID="uniqueidentifier" DisplayOrder=""/>
    Is there any way to do that using the xpath instead of the id? Or a quick wat to get the id using the xpath?

    Thanks a lot,
    Chana

  2. #2
    commarts is offline Junior Member
    Join Date
    Jul 2010
    Location
    Louisville
    Posts
    5

    Default Mapping Products into Multiple Categories

    I would like to know this as well. Imagine you have an Arts & Crafts kit for making Christmas decorations. This kit could fit in multiple categories such as: arts & crafts, christmas crafts, and kids crafts. We have a separate landing page on our site for Kids Crafts but currently don't have a way to target those products.

  3. #3
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    You can do the same thing by using the <Product Action="Add|Update"> command and specify the mapping tag.

    i.e.

    <Product Action="Update" ID="1234">
    <Mappings>
    <Entity EntityType="Category" Name="Category 1" Xpath="" ID="">
    </Mappings>
    </Product>

    The xml command above is just an example, you still have to follow the full syntax, as described in the manual.