Select Commerce Server Products Using an Expression
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > Content Selection Framework > Select Commerce Server Products Using an Expression




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Select Commerce Server Products Using an Expression  
steve


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-04 02:48 AM

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?





[ Post a follow-up to this message ]



    RE: Select Commerce Server Products Using an Expression  
Andy Xu[MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-04 02:18 PM

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?






[ Post a follow-up to this message ]



    Re: Select Commerce Server Products Using an Expression  
steve


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-04 02:58 PM

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@cpms
ftngxa06.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 you
r
> expression. However, it does require you to parse the expression body
> yourself -- it is an xml element.
>
> HTH,
> Andy Xu [MSFT]
> Commerce Server Team





[ Post a follow-up to this message ]



    Re: Select Commerce Server Products Using an Expression  
Andy Xu[MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-04 10: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






[ Post a follow-up to this message ]



    Re: Select Commerce Server Products Using an Expression  
steve


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-24-04 10:49 PM

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.





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:45 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register