Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mark 122 posts 255 karma points
    Jun 12, 2014 @ 18:00
    Mark
    0

    Importing structured product data with multiple categories of the same name

    Hi Guys,

    May seem like a simple question, feels like it should be, but I'm having a couple of issues.

    I have a data export for some products that follows the structure:

    Product Sector -> Product Range -> Product

    Simple enough...

    Product Sector is unique, Product Range is unique to a Product Sector, but can be the same across multiple Product Sectors. Product Name *should* be unique, but that remains to be seen in the next batch of exports I receive.

    At the moment I have 3 import actions:

    Parent Action - Sectors (to fill in all Product Sectors, primary key ProductSector)
        Child Action - Ranges (to fill in all Product Ranges, primary key ProductRange, parent relation key ProductSector)
            Child Action - Products (to fill in all Products, primary key ProductName, parent relation key ProductRange)

    I thought this was working, but apparently if a Product Range exists in more than one sector, then a product with that Range gets put into the first Range with the same name, not necessarily the one directly related to the product.

    Any thoughts on the best way to get around this, am I configuring the relations wrong?

    The other issue I have, is that some products appear to not have a Range, though they always have a Sector. My structure can handle this, but is there a way to tell CMSImport to import products under a sector if the Range is null/empty (it's coming from a comma delimited CSV if that makes any difference).

    Any help would be appreciated.

    Mark

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jun 13, 2014 @ 07:00
    Richard Soeteman
    0

    Hi Mark,

    When setting up the relations you need to make sure the primary key is unique. So if a product name is not unique that can cause some issues because it will just update the first product with the name. When possible switch to a product id as the primary key and then it doesn't matter if the name is unique or not since that is not the key anymore.

    That answers your other question related to product ranges also. A product can only be imported once so it will be the first range it finds. Maybe you can change the structure or use a Multi node tree picker or similar to select all the ranges a product can belong to?

    The best thing to handle the products without a range is to add an extra child action underneath sectors where you only import products without a range. You need to include only data without the range in the file that you upload here and on range level you do the other way around, only import products with a range.

    Hope this helps,

    Richard

  • Mark 122 posts 255 karma points
    Jun 13, 2014 @ 10:07
    Mark
    0

    Hi Richard,

    It sounds to me like I need some kind of ID fireld for each of the Product Ranges so that they then become unique, even if they have the same name, that should then ensure that a Product with a parent relation of that unique ProductRangeId goes in the correct folder? I think that would be better than trying to use an MNTP or similar as I'll never "know" what ranges exist for a product to belong to.

    As for running a second child action under the Sections import, that's pretty much what I had summised, that or getting the data export tweaked so that those products are always in a 'miscalaneous' Range.

    Thanks for the help,

    Mark

Please Sign in or register to post replies

Write your reply to:

Draft