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

Thread: Custom Categories ID

  1. #1
    zariaruiz is offline Member
    Join Date
    May 2011
    Posts
    31

    Default Custom Categories ID

    Hello,

    We are on the Data Migration Process and I have a question for you, we need to keep our old urls, so I found the url rewrite very helpful for us. Now our problem is that for our Categories pages we use a ID on our current urls so we need to keep the same IDs when we migrate over ASPDN, my question is how can I customize the CategoryID field, I already tried to remove the Identity option from the database and create a XML file with the CategoryID that we want to have, but didn't work.

    Could I save the ID we need in other field and then make the url structure with this specific field and not the CategoryID, I also tried this with the CategoryGUID, but didn't work either.

    There's any possibility of doing this. Do you have any other idea of how can be implemented. We really need to keep our urls so I'll appreciate our help.

    Thanks again

  2. #2
    esedirect is offline Senior Member
    Join Date
    Feb 2010
    Location
    Norfolk, UK
    Posts
    343

    Default

    You would need to disable the identity insert for the category table prior to impporting the data, like this:

    Code:
    SET IDENTITY_INSERT Category ON
    And then re-enable it after importing, like this:

    Code:
    SET IDENTITY_INSERT Category OFF
    However, I don't know whether this can be acheved using WSI, as we don't use it here.
    http://www.esedirect.co.uk
    --------------------------------------------------------------------------
    Using MS 9.2.0.0 with the following customisations:

    Lightbox/Fancybox enlarged images;
    Auto-suggest searchbox;
    Extra product information shown only to our IP Address (such as supplier info, costs, etc.);
    Failed transactions emailed via trigger;
    Custom app to show basket contents when customer online;
    Orders pushed through to accounting systems.

    All the above without source!

  3. #3
    webopius is offline Senior Member
    Join Date
    Nov 2008
    Location
    London, UK
    Posts
    440

    Default

    Off the top of my head (ie without actually thinking about the detail!), another way to approach this with some programming would be to store your 'old' category IDs in the ExtensionData field.

    Then, redirect all legacy category pages to showcategory.aspx and within showcategory.aspx.cs or ShowEntityPage.cs, do a lookup of the ExtensionData field to get the correct category to display.

  4. #4
    zariaruiz is offline Member
    Join Date
    May 2011
    Posts
    31

    Default Thanks

    Problem solved. Thank you guys!