Kbase P133806: How do I get all categories and subcategories when I do a search?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  7/30/2008 |
|
Status: Unverified
GOAL:
Why is only one level of categories returned on a search?
GOAL:
How do I get all categories and subcategories when I do a search?
FACT(s) (Environment):
EasyAsk 9.7
EasyAsk 10.1
FIX:
Beginning in EasyAsk 9.7, you can retreive all categories and subcategories when doing a search. Add the HTTP parameter &subcategories=1 or call the easyask NavigateCategory method getSubCategories(). The returned XML will contain all levels of categories and product counts in the hierarchy.
Sample url:
http://localhost:9100/EasyAsk/apps/Advisor.jsp?dct=EcomDemo&RequestAction=advisor&RequestData=CA_Search&indexed=1&ResultsPerPage=10&oneshot=1&disp=XML&subcategories=1&CatPath=All%20Products&q=shoes
excerpt from returned XML:
<EA_CategoryList>
- <EA_Category EA_ProductCount="53">
Everything for Him
- <EA_SubCategories>
<EA_Category EA_ProductCount="1">Accessories</EA_Category>
- <EA_Category EA_ProductCount="52">
00> Shoes
- <EA_SubCategories>
<EA_Category EA_ProductCount="37">Casual</EA_Category>
<EA_Category EA_ProductCount="26">Dress</EA_Category>
</EA_SubCategories>
</EA_Category>
</EA_SubCategories>
</EA_Category>
- <EA_Category EA_ProductCount="232">
Shoes, Handbags., Jewelry & More
- <EA_SubCategories>
<EA_Category EA_ProductCount="27">Evening</EA_Category>
<EA_Category EA_ProductCount="14">Flats</EA_Category>
<EA_Category EA_ProductCount="28">Loafers</EA_Category>
<EA_Category EA_ProductCount="22">Mules</EA_Category>
<EA_Category EA_ProductCount="21">Pumps</EA_Category>
NDENT: -2em"> <EA_Category EA_ProductCount="34">Sandals</EA_Category>
<EA_Category EA_ProductCount="56">Slides</EA_Category>
<EA_Category EA_ProductCount="9">Sport Shoes</EA_Category>
<EA_Category EA_ProductCount="25">Thongs</EA_Category>
</EA_SubCategories>
</EA_Category>
- <EA_Category EA_ProductCount="12">
ONG>Sale
- <EA_SubCategories>
<EA_Category EA_ProductCount="2">Great Buys</EA_Category>
<EA_Category EA_ProductCount="12">Sale</EA_Category>
</EA_SubCategories>
</EA_Category>
</EA_CategoryList>
</EA_Categories>.