Posted by
Nicolas Malin (Jira) on
Apr 04, 2012; 3:23am
URL: http://ofbiz.116.s1.nabble.com/jira-Created-OFBIZ-4755-E-commerce-search-does-not-always-functioning-correctly-tp4501705p4530839.html
[
https://issues.apache.org/jira/browse/OFBIZ-4755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13245994#comment-13245994 ]
Scott Gray commented on OFBIZ-4755:
-----------------------------------
Your patch includes the catalog using currentCatalogId which is sourced from a call to "CatalogWorker.getCurrentCatalogId(request);"
There is no reason whatsoever why that same method can't be used to source the catalog id AFTER the form is submitted.
In KeywordSearch.groovy just change:
{code}
ProductSearchSession.processSearchParameters(parameters, request);
prodCatalogId = CatalogWorker.getCurrentCatalogId(request);
result = ProductSearchSession.getProductSearchResult(request, delegator, prodCatalogId);
{code}
to
{code}
prodCatalogId = CatalogWorker.getCurrentCatalogId(request);
parameters.SEARCH_CATALOG_ID = prodCatalogId
ProductSearchSession.processSearchParameters(parameters, request);
result = ProductSearchSession.getProductSearchResult(request, delegator, prodCatalogId);
{code}
Voila, no need to pass it through the form and no risk of exposing products from private catalogs.
> E-commerce search does not always functioning correctly
> -------------------------------------------------------
>
> Key: OFBIZ-4755
> URL:
https://issues.apache.org/jira/browse/OFBIZ-4755> Project: OFBiz
> Issue Type: Bug
> Components: specialpurpose/ecommerce
> Reporter: Jeremy Olmstead
> Priority: Minor
> Attachments: ecommerceSearch1.patch, ecommerceSearch2.patch
>
>
> There seems to be a number of problems with the way e-commerce search works. I'll just a name a few examples of things I have tried that don't seem to work the way I think they should. I can delete a catalog from a store and the catalog still shows up and is completely searchable. I can delete a part from a catalog, then search the catalog and it still shows up, if you click the part from the search results you get a NullPointerException error. To take things a step further, after deleting the main catalog from the web store, I changed it to View Allow instead of Browse Root, then I even changed every category within the catalog to internal and search still finds parts from that catalog. Then I created a new catalog and category and put a product within. From here I can drill down to the part from the newly created catalog, but when I click on the part for details, it still directs me to the other catalog!
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspaFor more information on JIRA, see:
http://www.atlassian.com/software/jira