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: Extract category information

  1. #1
    nirmal is offline Member
    Join Date
    May 2009
    Location
    Conyers, GA
    Posts
    35

    Default Extract category information

    I am trying to generate a product feed that contains information such as productname, sku, category, genre etc.

    The category information should be laid out like: Helmets, Armor & Shields\Helmets\"300" Spartan Helmet

    The slashes separate the categories and sub categories so the parent category is Helmets, Armor & Shields and subcategory is Helmets.

    Similarly genre, manufacturer information needs to be obtained.

    Any thoughts on how to recursively obtain all the information for categories, genres, manufacturers etc for every product?

    I tried looking for the code that generates the breadcrumbs but didn't have much luck. Is there a stored proc that does this?

    Appreciate any help.

  2. #2
    Dimmer is offline Member
    Join Date
    May 2008
    Location
    London
    Posts
    40

    Default

    Take a look in google for recursive treeviewand tsql. That should get you started.
    Alan
    Version (Code/DB): AspDotNetStorefront ML 7.1.0.0/7.1.1.0 - with modifications
    www.stuff-uk.net

  3. #3
    nirmal is offline Member
    Join Date
    May 2009
    Location
    Conyers, GA
    Posts
    35

    Default

    Appreciate you pointing me out to what I should look for. Here is a link to some useful stuff that i found: http://www.sqlteam.com/article/more-...archies-in-sql

    Once I figure out the complete solution I will post it as well

  4. #4
    nirmal is offline Member
    Join Date
    May 2009
    Location
    Conyers, GA
    Posts
    35

    Default One solutions

    I am using this script..

    select parentcategory.name, category.name, product.name, productcategory.productid, sku
    from productcategory
    left join product on productcategory.productid=product.productid
    left join category on category.categoryID=productcategory.categoryID
    left join category as parentcategory on category.parentcategoryid=parentcategory.categoryi d
    order by product.productid

    Similarly you can obtain genres, sections, manufacturers and other "categories"