You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Deepa Mandal <de...@gmail.com> on 2010/01/11 13:15:51 UTC
how to get product on basis of product category and product attribute
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
Re: how to get product on basis of product category and product
attribute
Posted by Cimballi <ci...@gmail.com>.
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 <de...@gmail.com> 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
>