cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

supercategories

Former Member
0 Likes
1,318

Could you please help me to create “SuperCategory from the join of product and category model using Flexible Search Query

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi Jakub, Thanks for your reply with explanation . Actually i have to add one column in the report which will display super categories of the product using join table of product and categories in Flexible search query . Thanks in advance ......

Answers (1)

Answers (1)

Former Member
0 Likes

Hi Satish,

Since you haven't described what exactly you need I can give you only general query:

 SELECT * 
 FROM {
     Product as p JOIN CategoryProductRelation as rel
    ON {p:PK} = {rel:target}
    JOIN Category AS c
    ON {rel:source} = {c:PK} 
    }

Hope this helps and Best Regards,

Former Member
0 Likes

@Satish

For report you could use something like that:

 SELECT {p:name[en]} AS ProductName, {other product fields needed in the report}, {c:name[en]} AS CategoryName 
  FROM {
      Product as p JOIN CategoryProductRelation as rel
     ON {p:PK} = {rel:target}
     JOIN Category AS c
     ON {rel:source} = {c:PK} 
     }

Best Regards,