06-26-04 03:50 PM
I have done the following
1. Extended the "Targeting Context" Profile by adding a
field "TargetProduct"
2. Based on this using BizDesk I created a "Target
Group" where the Expression is TargetProduct="SKU" and
the Action is "Target"
3. In an advertising campaign I created an Advertisement
where "Page Group" was "ALL" and the above TargetGroup
was the assigned target group.
4. I'm trying to retrieve the ad like so...
Dim oCommerceContext As CommerceContext
Dim oCS As ContentSelector
oCommerceContext = CommerceContext.Current
oCommerceContext.TargetingSystem.TargetingContextProfile
("PageGroup").Value = "All"
oCommerceContext.TargetingSystem.TargetingContextProfile
("TargetProduct").Value = ProductID
oCS = oCommerceContext.TargetingSystem.SelectionContexts
("Advertising").GetSelector()
If Not oCS Is Nothing Then
oCS.Profiles.Add("targetingContext",
oCommerceContext.TargetingSystem.TargetingContextProfile)
If oCommerceContext.AuthenticationInfo.IsAuthenticated
() Then
oCS.Profiles.Add("user",
oCommerceContext.UserProfile)
End If
oCS.ItemsRequested = 3
oCS.Size = "Button1"
m_arDiscounts = oCS.GetContent()
If m_arDiscounts.Count > 0 Then
productDiscountsDisplay.DataSource = m_arDiscounts
productDiscountsDisplay.DataBind()
End If
End If
Now what is happening is that the ad is being shown for
every product, While I wanted only where the target group
condition is true.
Is there something I missed ? How can cause the selection
framework to return this only when the target group is
exactly matched.
HELP !
>-----Original Message-----
>Ravi,
>
>Unfornately, there is no direct out-of-box solution for
the scenario you describe, which is more like predict
discounts based on product. The content selection feature
provided by
>Commerce Server 2002 is to show ad/discount targetted by
user profile or target context. What you want is
targetted by product/SKU.
>
>A workaround I can think of is to add a property to
targeting context, for example,
called "TargetedProduct". for each discount, you create
a target expression, which is
>TargetingContext.TargetedProduct = <SKU value>". And in
the runtime code, for each request to the product page,
your site code is in charge of adding corresponding SKU
(s) to the
>targeting context's TargetedProduct property.
(CommerceContext.Current.TargetingSystem.TargetingContextP
rofile ) And running ContentSelector should get the
targetted discounts.
>
>The problem is, of course, if you have multiple products
in one page, you will probably get more than one returned
applicable discounts. You probably have to use the site
code to
>mapping the returned discount to show with the correct
product.
>
>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.
>--------------------
>Content-Class: urn:content-classes:message
>From: "Ravi Shankar" <shankar.nospam@hp.com>
>Sender: "Ravi Shankar" <shankar.nospam@hp.com>
>Subject: how to get a list of discounts applicable for a
product/SKU
>Date: Sat, 1 May 2004 03:55:23 -0700
>Lines: 15
>Message-ID: <6f6b01c42f6a$cdc64b20$a101280a@phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Thread-Index: AcQvas3G/7jH3b5dTSmKM+rVrGQnwg==
>Newsgroups: microsoft.public.commerceserver.campaigns_csf
>Path: cpmsftngxa10.phx.gbl
>Xref: cpmsftngxa10.phx.gbl
microsoft.public.commerceserver.campaigns_csf:2625
>NNTP-Posting-Host: tk2msftngxa09.phx.gbl 10.40.1.161
>X-Tomcat-NG:
microsoft.public.commerceserver.campaigns_csf
>
>
>As part of the site we're building the customer has a
>requirement that states that they would like to see all
>discounts applicable for a product/SKU to be visible on
>the product listing page.
>
>I have gone through the documentation (probably not with
>sufficient thoroughness) but am at a loss on how for
>every product I can query the CFS for all possible
>discounts available on it...
>
>Any pointers welcome
>
>Regards.
>Ravi.
>
>
[ Post a follow-up to this message ]
|