Results 1 to 1 of 1
  1. #1
    Join Date
    May 2010
    Posts
    1

    Unanswered: filter product by attr

    I have there table:

    Code:
    product (id,name)
    1  Samsung
    2  Toshiba
    3  Sony
    
    attribute (id,name,parentid)
    1 Size 0
    2 19" 1
    3 17" 1
    4 15" 1
    5 Color 0
    6 White 1
    7 Black 2
    
    attribute2product (id,productid,attributeid)
    1 1 2
    2 1 6
    3 2 2
    4 2 7
    5 3 3
    6 3 7
    I was list them like:

    HTML Code:
    Size
    -- 19" (2 product(s))
    -- 17" (1 product)
    -- 15" (0 product)
    
    Color
    -- White (1 product)
    -- Black (2 product(s))
    Please help me to filter product, eg: when I choose the Size 19" (that product id 1 and 2 have), this will display:

    HTML Code:
    Size
    -- 19"
    
    Color
    -- White (1 product)
    -- Black (1 product)
    Thanks,
    Last edited by vavietnam; 05-10-10 at 12:58.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •