how to get product on basis of product category and product attribute

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to get product on basis of product category and product attribute

Deepa Mandal
Hi Ofbiz,

There is a requirement for fetching list of Product on the basis of
Product_Category_Id(TABLE:Product_Category) and
ATTR_NAME(TABLE:Product_Attribute) and ATTR_VALUE(TABLE:Product_Attribute).

Let's suppose,
The given category is
newarrival, bestseller, mostviewed.

I have to filter the result on the basis of "attr_name":language and
"attr_value":Spanish.

What will be  the best solution to do the same with minimal effort?

Thanks,
Deepa Mandal
Reply | Threaded
Open this post in threaded view
|

Re: how to get product on basis of product category and product attribute

Cimballi-2
To search on several entities, you can use joins, and to use joins you
can use DynamicViewEntity, look at the
"finishCategoryAndFeatureConstraints" method in the
"applications/product/src/org/ofbiz/product/product/ProductSearch.java"
class for an example.

Cimballi


On Mon, Jan 11, 2010 at 7:15 AM, Deepa Mandal <[hidden email]> wrote:

> Hi Ofbiz,
>
> There is a requirement for fetching list of Product on the basis of
> Product_Category_Id(TABLE:Product_Category) and
> ATTR_NAME(TABLE:Product_Attribute) and ATTR_VALUE(TABLE:Product_Attribute).
>
> Let's suppose,
> The given category is
> newarrival, bestseller, mostviewed.
>
> I have to filter the result on the basis of "attr_name":language and
> "attr_value":Spanish.
>
> What will be  the best solution to do the same with minimal effort?
>
> Thanks,
> Deepa Mandal
>