[ 
http://issues.apache.org/jira/browse/OFBIZ-179?page=comments#action_12433975 ] 
            
Marco Risaliti commented on OFBIZ-179:
--------------------------------------

Hi David,

Thanks a lot for review the patch included into this issue.

You can see my comment in-line:
- a number of changes that are simply reformatting (makes it more difficult to 
review, plus leads to inconsistent fomatting in the file) 
  
Probably it's due to save and then delete rows into the sources but I'm not 
sure in any case I will provide a new patch to see if it happens again.

- the locale establishment is not consistent, and the request.getLocale alone 
should not be used; the best method is the UtilHttp.getLocale(request) method 

Yes, I have see that in a lot of place it's used the method 
UtilHttp.getLocale(request) but into the ProductSearch.java there wasn't any 
request at disposal to get the related bundle so this why I have included into 
ProductSearchSession.java.
I didn't like to pass the request to those sort of service (ProductSearch.java).
Did you have any different idea to solve it ?

- instead of passing around the request in addition to the session we should 
just pass around the request instead of the session 
Yes, I agree with you that If I use simple the request I can retrieve the 
session from the method getSession() and I will change the code to avoid this 
duplication of parameters.

- I don't really like the way the i18n is handled with the 
set/getResourceBundle methods; it's generally better to use the UtilProperties 
stuff directly and let it take care of the details as is done elsewhere 

Yes, i have agree with you but in the ProductSearch.java I have not at disposal 
the locale to execute directly the method UtilProperties.getMessage(resource, 
name, locale).

- I'm not sure what the point is of the new CatalogConstraint... it looks like 
it ignores the prodCatalogId and otherwise could be more correctly called a 
"CategorySetConstraint", like the FeatureSetConstraint is an alternative to the 
FeatureConstraint 

In reality if you look into the code it's shows the catalog name into the 
method prettyPrintConstraint() of CatalogConstraint and to retrieve the 
products it needs a set of keys (productCategoryIds).

I prefer if you can help me to solve in better way the issue because also I 
have found only this solution for the moment.

Thanks 
Marco



> Searching product with catalog
> ------------------------------
>
>                 Key: OFBIZ-179
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-179
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order, product
>    Affects Versions: SVN trunk
>         Environment: Windows
>            Reporter: Marco Risaliti
>         Assigned To: Jacques Le Roux
>            Priority: Minor
>         Attachments: search_by_catalog2.patch, search_by_catalog2_18n.patch
>
>
> Now is not possible to search all the products inside different categories.
> In detail into the front-end (ecommerce application) is now possible into the 
> advanced search button to searching products outside the selected catalog.
> For example If I have two different Stores (Shop1, Shop2) and Catalog 
> (Catalog1, Catalog2) of two different Web Sites (WebSite1, WebSite2) is it 
> possibile to see the products of Catalog1 & Catalog2 from both of the 
> WebSites.
> So I have made a change to the ecommerce advanced search that in case any 
> categories was selected it will use the categories linked to the selected 
> catalog for searching products.
> I this case will be not more possible to see the products outside the 
> Catalogs of the current WebSite apart products shared between different 
> Catalogs.
> In the backend I have add the possibility to search products by catalogs.
> I this patch you can find all those changes and a lot of changes for I18n 
> missing.
> I hope this time I have attached a patch with tabs transformed to space, if 
> it's not true can you tell me so I can check it.
> Can some committers look at this and then if everythings is ok commits.
> Thanks in advance
> Marco Risaliti

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to