|
Home > Archive > Commerce Server Solution Sites > February 2004 > duplicate products
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
duplicate products
|
|
| Sabari 2004-02-07, 9:39 am |
| Hello,
Is there a way to filter out duplicate products (products which are in
multiple categories in the same catalog) when you do a search ? Looks
like if a product is present in 4 different categories, the search
results will show the same product 4 times whereas i want it to be
shown only once. I couldnt find any option in the CatalogSearchOptions
to do this - so is there any undocumented parameter which will return
only the 'distinct' products ? Any inputs regarding this is really
appreciated.
Thanks
Sabari.
| |
| Sabari 2004-02-07, 9:39 am |
| *bump*
anyone ? any help ? any pointers atleast ?
thanks
cpsabari@netscape.net (Sabari) wrote in message news:<b2a23a7.0312300645.5bf94035@posting.google.com>...
> Hello,
> Is there a way to filter out duplicate products (products which are in
> multiple categories in the same catalog) when you do a search ? Looks
> like if a product is present in 4 different categories, the search
> results will show the same product 4 times whereas i want it to be
> shown only once. I couldnt find any option in the CatalogSearchOptions
> to do this - so is there any undocumented parameter which will return
> only the 'distinct' products ? Any inputs regarding this is really
> appreciated.
>
> Thanks
> Sabari.
| |
| Max Akbar 2004-02-07, 9:39 am |
| I am not sure if there is way to do this using the CS API and if you using
..NET try the following:
This KB link provides a select distinct of a dataset.
http://support.microsoft.com/defaul...kb;EN-US;326176
Good luck,
-Max
"Sabari" <cpsabari@netscape.net> wrote in message
news:b2a23a7.0312300645.5bf94035@posting.google.com...
> Hello,
> Is there a way to filter out duplicate products (products which are in
> multiple categories in the same catalog) when you do a search ? Looks
> like if a product is present in 4 different categories, the search
> results will show the same product 4 times whereas i want it to be
> shown only once. I couldnt find any option in the CatalogSearchOptions
> to do this - so is there any undocumented parameter which will return
> only the 'distinct' products ? Any inputs regarding this is really
> appreciated.
>
> Thanks
> Sabari.
| |
| Vinayak Tadas [MS] 2004-02-07, 9:39 am |
| Can you post the sample code you are using. You should be able to get
distinct products by passing in appropriate values for the
PropertiesToReturn parameter.
Thanks
Vinayak Tadas
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation. All rights
reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Get Secure! For more info visit http://www.microsoft.com/security. Please
reply to the newsgroups only. Thanks
"Sabari" <cpsabari@netscape.net> wrote in message
news:b2a23a7.0312300645.5bf94035@posting.google.com...
> Hello,
> Is there a way to filter out duplicate products (products which are in
> multiple categories in the same catalog) when you do a search ? Looks
> like if a product is present in 4 different categories, the search
> results will show the same product 4 times whereas i want it to be
> shown only once. I couldnt find any option in the CatalogSearchOptions
> to do this - so is there any undocumented parameter which will return
> only the 'distinct' products ? Any inputs regarding this is really
> appreciated.
>
> Thanks
> Sabari.
| |
| Sabari 2004-02-07, 9:39 am |
| Here is the relevant search code :
searchOptions.ClassTypes = CatalogClassTypes.ProductClass Or
CatalogClassTypes.ProductFamilyClass Or
CatalogClassTypes.ProductFamilyForVariantsClass
searchOptions.SetPaging(currPage,8)
searchOptions.PropertiesToReturn = SEARCH_RETURNPROPERTIES
searchOptions.SortAscending = True
searchOptions.SortProperty = "ProductCode"
catalogSearch.SearchOptions = searchOptions
catalogSearch.SearchOptions.RecordsToRetrieve = 8 'displayNo
catalogSearch.SQLWhereClause = " QOH > 0 AND StatusCode = 1"
data = catalogSearch.Search(totalProducts)
The PropertiesToReturn is defined in CatalogShared.vb as :
Public Const SEARCH_RETURNPROPERTIES As String =
" CatalogName,CategoryName,ProductName,Def
initionName,cy_list_price,OriginalPrice,
ProductId,VariantID,ImagePath,ProductCod
e,Clearance"
Maybe I dint understand u well, I tried changing "ProductCode" to
"distinct Product" in the above line and it dint work.
Thanks
Sabari.
"Vinayak Tadas [MS]" <vtadas@online.microsoft.com> wrote in message news:<e8JHirw1DHA.1356@TK2MSFTNGP10.phx.gbl>...[color=blue]
> Can you post the sample code you are using. You should be able to get
> distinct products by passing in appropriate values for the
> PropertiesToReturn parameter.
>
> Thanks
> Vinayak Tadas
> Microsoft
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use. © 2002 Microsoft Corporation. All rights
> reserved.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> Get Secure! For more info visit http://www.microsoft.com/security. Please
> reply to the newsgroups only. Thanks
>
> "Sabari" <cpsabari@netscape.net> wrote in message
> news:b2a23a7.0312300645.5bf94035@posting.google.com...
| |
| Sabari 2004-02-07, 9:39 am |
| vinayak .. any update on this ?
thanks
sabari.
cpsabari@netscape.net (Sabari) wrote in message news:<b2a23a7.0401100927.37a6298b@posting.google.com>...[color=blue]
> Here is the relevant search code :
>
> searchOptions.ClassTypes = CatalogClassTypes.ProductClass Or
> CatalogClassTypes.ProductFamilyClass Or
> CatalogClassTypes.ProductFamilyForVariantsClass
> searchOptions.SetPaging(currPage,8)
> searchOptions.PropertiesToReturn = SEARCH_RETURNPROPERTIES
> searchOptions.SortAscending = True
> searchOptions.SortProperty = "ProductCode"
>
> catalogSearch.SearchOptions = searchOptions
> catalogSearch.SearchOptions.RecordsToRetrieve = 8 'displayNo
>
> catalogSearch.SQLWhereClause = " QOH > 0 AND StatusCode = 1"
> data = catalogSearch.Search(totalProducts)
>
>
> The PropertiesToReturn is defined in CatalogShared.vb as :
>
> Public Const SEARCH_RETURNPROPERTIES As String =
> " CatalogName,CategoryName,ProductName,Def
initionName,cy_list_price,OriginalPrice,
ProductId,VariantID,ImagePath,ProductCod
e,Clearance"
>
> Maybe I dint understand u well, I tried changing "ProductCode" to
> "distinct Product" in the above line and it dint work.
>
> Thanks
> Sabari.
>
> "Vinayak Tadas [MS]" <vtadas@online.microsoft.com> wrote in message news:<e8JHirw1DHA.1356@TK2MSFTNGP10.phx.gbl>...
| |
| Sabari 2004-02-07, 9:39 am |
| *bump*
since i desperately need a solution for this !
cpsabari@netscape.net (Sabari) wrote in message news:<b2a23a7.0401160744.63c2b64a@posting.google.com>...[color=blue]
> vinayak .. any update on this ?
> thanks
> sabari.
>
> cpsabari@netscape.net (Sabari) wrote in message news:<b2a23a7.0401100927.37a6298b@posting.google.com>...
|
|
|
|
|