I have around 20-25 products under couple of categories. Looking for some sort of example code showing custom search resulting category / product pages only.
Hope someone can help.
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
I have around 20-25 products under couple of categories. Looking for some sort of example code showing custom search resulting category / product pages only.
Hope someone can help.
This might help.
http://www.silverstripe.org/all-other-modules/show/6641?start=24
I downloaded the code from the 4th page here and worked very well.
Cheers
Scott
Cheers Scott,
I did look at the code. I have not implemented categories and products as DOM (DataObjectManager).
My requirement is to implement custom search snippet on the category/product pages when searched will get results only from product pages (Title / Content).
There will be another website search which will only show results from simple pages excluding product pages.
Is that possible? Sorry very new to SilverStripe.
Take a look at this tutorial on how to extend and create your own page types:
http://doc.silverstripe.org/sapphire/en/tutorials/2-extending-a-basic-site
Once you have got that working, you should be able to search your new product type custom fields. By default the normal search only searches the title and content fields.
By default the custom search will search "all" pages and any classes you tell it to search. Once you have this working I can tell you how to modify this.
Hope that helps.
Regards
Scott