|
Home > Archive > Content Selection Framework > September 2004 > Select Commerce Server Products Using an Expression
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 |
Select Commerce Server Products Using an Expression
|
|
|
| I have created a catalog expression using the Campaign Expressions biz
Desk component in Commerce Server 2002.
I would like to write some asp code that selects all products from the
database that match this expression. Is there a way to do this?
| |
| Andy Xu[MSFT] 2004-09-23, 9:18 am |
| Hi, there,
I don't think there is a direct way to do that. But you can utilize the
CatalogSearch BCL class to construct a correct SQLWhereClause based on your
expression. However, it does require you to parse the expression body
yourself -- it is an xml element.
HTH,
Andy Xu [MSFT]
Commerce Server Team
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
From: swesorickspam@yahoo.com (steve)
Newsgroups: microsoft.public.commerceserver.campaigns_csf
Subject: Select Commerce Server Products Using an Expression
Date: 22 Sep 2004 14:18:26 -0700
Organization: http://groups.google.com
Lines: 5
Message-ID: <5beea498.0409221318.19000e68@posting.google.com>
NNTP-Posting-Host: 67.36.53.162
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1095887906 15208 127.0.0.1 (22 Sep 2004
21:18:26 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 22 Sep 2004 21:18:26 +0000 (UTC)
Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!fr.ip.ndsoftware.net!proxad.net!postnews1.google.com!not-for-mail
Xref: cpmsftngxa06.phx.gbl
microsoft.public.commerceserver.campaigns_csf:2861
X-Tomcat-NG: microsoft.public.commerceserver.campaigns_csf
I have created a catalog expression using the Campaign Expressions biz
Desk component in Commerce Server 2002.
I would like to write some asp code that selects all products from the
database that match this expression. Is there a way to do this?
| |
|
| Yeah, I'd gotten that far. Once I saw the format of the XML, I
realized that Commerce Server must already have the logic to parse
that xml and compare it to a product built in. I was hoping I
wouldn't need to repeat that logic myself in order to use it to select
a product.
Thanks for your help.
andyxu@online.microsoft.com (Andy Xu[MSFT]) wrote in message news:<vUPVFDRoEHA.2864@cpmsftngxa06.phx.gbl>...
> Hi, there,
>
> I don't think there is a direct way to do that. But you can utilize the
> CatalogSearch BCL class to construct a correct SQLWhereClause based on your
> expression. However, it does require you to parse the expression body
> yourself -- it is an xml element.
>
> HTH,
> Andy Xu [MSFT]
> Commerce Server Team
| |
| Andy Xu[MSFT] 2004-09-23, 5:51 pm |
| Well, Commerce Server does have the logic to build/parse the expression
body. Unfortunately, i don't think there is any public API exposing those
functionalities.
Andy Xu [MSFT]
Commerce Server Team
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
From: swesorickspam@yahoo.com (steve)
Newsgroups: microsoft.public.commerceserver.campaigns_csf
Subject: Re: Select Commerce Server Products Using an Expression
Date: 23 Sep 2004 06:35:04 -0700
Organization: http://groups.google.com
Lines: 20
Message-ID: <5beea498.0409230535.50780e9f@posting.google.com>
References: <5beea498.0409221318.19000e68@posting.google.com>
<vUPVFDRoEHA.2864@cpmsftngxa06.phx.gbl>
NNTP-Posting-Host: 67.36.53.162
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1095946505 14670 127.0.0.1 (23 Sep 2004
13:35:05 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 23 Sep 2004 13:35:05 +0000 (UTC)
Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!border2.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.gigane
ws.com!news.glorb.com!postnews1.google.com!not-for-mail
Xref: cpmsftngxa06.phx.gbl
microsoft.public.commerceserver.campaigns_csf:2868
X-Tomcat-NG: microsoft.public.commerceserver.campaigns_csf
Yeah, I'd gotten that far. Once I saw the format of the XML, I
realized that Commerce Server must already have the logic to parse
that xml and compare it to a product built in. I was hoping I
wouldn't need to repeat that logic myself in order to use it to select
a product.
Thanks for your help.
andyxu@online.microsoft.com (Andy Xu[MSFT]) wrote in message
news:<vUPVFDRoEHA.2864@cpmsftngxa06.phx.gbl>...
> Hi, there,
>
> I don't think there is a direct way to do that. But you can utilize the
> CatalogSearch BCL class to construct a correct SQLWhereClause based on
your
> expression. However, it does require you to parse the expression body
> yourself -- it is an xml element.
>
> HTH,
> Andy Xu [MSFT]
> Commerce Server Team
| |
|
| I managed to find some functions/subs in the BizDesk which were able
to parse out the expression XML for me and create a WHERE clause out
of it. Not quite as good as exposing an API, but it beats re-writing
them myself from scratch.
They were in the \BizDesk\Catalogs\Editor\Common.asp file.
The primary one was:
Sub AddFilterXMLToProductQuery (ByRef oFilterXML, _
ByRef sMetaOperator, _
ByRef sPhrase)
And that called a few other functions/subs on the same page.
Thanks for your help.
|
|
|
|
|