Extending service
Posted: Tue Aug 28, 2012 7:24 am
My main menu has sub menus and the sub menus has other sub menus. So there are 3 menus in total and there are a total of 800 products. If the user selects a parent menu the site should list all the items under all it's child menu. Instead of listing all 800 items when the parent menu is selected, paging will be used and few items from each sub menu category will be displayed. Currently to display a child item when a parent menu is selected I have to include the item in the parent menu category and all the sub menu categories in broadleaf admin .
Will be a good idea to:
1) Extend the ProductSearchService which gets called in BroadleafCategoryController. Extending ProductSearchService means I will have to extend and create my own DatabaseProductSearchServiceImpl, CatelogServiceImpl and ProductDaoImpl classes. ProductDaoImpl is where the search logic will be implemented which will iterate through all the child categories and select some items from each category to be display ?
2) Just call the ProductDaoImpl.readFilteredActiveProductsByQuery method by passing it a HQL query ?
3) Add products to each category (parent category and to every single child category) in broadleaf admin ? This will take a lot of time and more chances of making a mistake.
Or is this something SOLR library can help me with ?
Will be a good idea to:
1) Extend the ProductSearchService which gets called in BroadleafCategoryController. Extending ProductSearchService means I will have to extend and create my own DatabaseProductSearchServiceImpl, CatelogServiceImpl and ProductDaoImpl classes. ProductDaoImpl is where the search logic will be implemented which will iterate through all the child categories and select some items from each category to be display ?
2) Just call the ProductDaoImpl.readFilteredActiveProductsByQuery method by passing it a HQL query ?
3) Add products to each category (parent category and to every single child category) in broadleaf admin ? This will take a lot of time and more chances of making a mistake.
Or is this something SOLR library can help me with ?