Order level discount
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 > Order level discount




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

    Order level discount  
Sreeku_2002


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


 
12-08-04 10:51 PM

Hi ,

I have the following three queries.

1)There doesnt seem to be way to set up a discount to give a particular
item free in case order total is of a specific amount.
Eg:- order total of 500 $ give a jeans free.
Is there any round about way of acheiving this if i am correct in my
deduction.

2)Is there a API to get all valid  public coupon code for display?If not
how to acheive this.we need this for mailing across the selected coupons
to the users.

3)Is there a way to evaluate target groups by supplying a list of
profiles.Right now we have found a way only to pass a single profile to
each target expression inside a target group and keep on evaluating till
all profiles are evaluated.Can we pass a set of profiles to the target
expression and get it evaluated for a output list.

Please help .We are relatively new to commerce server and urgent help is
required.

thanks and regards,
Sreeku








[ Post a follow-up to this message ]



    RE: Order level discount  
Andy Xu[MSFT]


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


 
12-09-04 07:53 AM

Hi, there,

Thanks for using Commerce Server newsgroup.

1) Create a discount from the discount manager, then open this discount, in
the "definition" tab, set Condition to "any product" minimal value is
$500.00. Then set Award to "Product/Category" and click "add" to specify
the free product you want to give away. make sure the award is 100%
percentage off.  Also in you think the UI is not intuitive enough and you
have any suggestion to make it better, we would appreciate your feedback

2) yes, you can do it in API level (not one API call though).
MarketingSystem.PromoCodeDefinitions is an instance of
PromoCodeDefintionManager. from there, you can do a search in which
UsageOption is equaled to public.

3) not quite sure about your question, can you somehow show me your current
code so that i can get a better idea about you are trying to do?

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: "Sreeku_2002" <sreeku_2002@yahoo.com>
Newsgroups: microsoft.public.commerceserver.campaigns_csf
Subject: Order level discount
Date: Wed, 08 Dec 2004 14:58:20 -0500
Organization: www.talkaboutsoftware.com
Message-ID:
< 83bc13045ab60228fce784483b9b79cc@localho
st.talkaboutsoftware.com>
X-Newsreader: www.talkaboutsoftware.com
Content-Type: text/plain;
X-Complaints-To: abuse@supernews.com
Lines: 28
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!tiscali!newsfeed1.ip.tiscali.net!news.tele.dk!new
s.tele.dk!small.news.tele.dk!sn-xit-03!sn-xit-11!sn-xit-09!sn-xit-08!sn-post
-01!supernews.com!corp.supernews.com!not-for-mail
Xref: cpmsftngxa10.phx.gbl
microsoft.public.commerceserver.campaigns_csf:2909
X-Tomcat-NG: microsoft.public.commerceserver.campaigns_csf

Hi ,

I have the following three queries.

1)There doesnt seem to be way to set up a discount to give a particular
item free in case order total is of a specific amount.
Eg:- order total of 500 $ give a jeans free.
Is there any round about way of acheiving this if i am correct in my
deduction.

2)Is there a API to get all valid  public coupon code for display?If not
how to acheive this.we need this for mailing across the selected coupons
to the users.

3)Is there a way to evaluate target groups by supplying a list of
profiles.Right now we have found a way only to pass a single profile to
each target expression inside a target group and keep on evaluating till
all profiles are evaluated.Can we pass a set of profiles to the target
expression and get it evaluated for a output list.

Please help .We are relatively new to commerce server and urgent help is
required.

thanks and regards,
Sreeku









[ Post a follow-up to this message ]



    Re: Order level discount  
Sreeku_2002


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


 
12-09-04 10:49 PM

Hi andy,

Thank you very much  for the your immediate
responses.As far as the question on evaluating target groups the
requirement is as follows.The client wants to send direct mails to a a
list of users generated using the various conditions avilable in target
groups.Hence we are trying to make a list from a target group the code is
given below.

The problem is we have to pass each profile to the target expression
seperately for evaluation.there is no way to evaluate a group of users
againist a traget expression or target group.
------------------------------------------------------------
CommerceContext csContext = CommerceContext.Current;
objDebug = csContext.DebugContext;
Microsoft.CommerceServer.Runtime.Targeting.ExpressionEvaluator objexpr =
new
Microsoft.CommerceServer.Runtime.Targeting.ExpressionEvaluator(constr,objDeb
ug);
ProfileContext profContext = CommerceContext.Current.ProfileSystem;
for(int i=0;i<dtProfiles.Rows.Count;i++)
{
bool flag = true;
for(int j=0;j<dtTargetExpr.Rows.Count;j++)
{
Profile prof =
profContext.GetProfile("logon_name",dtProfiles.Rows[i]["u_logon_name
"].ToString(),"UserObject");
TargetingProfileCollection profcoll = new
TargetingProfileCollection();
profcoll.Add("UserObject",prof);

if((objexpr.Evaluate((int)dtTargetExpr.Rows[j]["ExprID"],profcoll).T
oString()=="True")!=
(dtTargetExpr.Rows[j]["i_target_action"].ToString()=="2"))
{
flag = false;
}
objexpr.FlushCache();

}
if(flag)
{

objLib.AddUserToMailingList(oListID,dtProfiles.Rows[i]["u_email_addr
ess"].ToString(),dtProfiles.Rows[i]["g_user_id"].ToString(),
2, 1033, DBNull.Value);
}
}

------------------------------------------------------------


thanks and regards,
sreekanth






[ Post a follow-up to this message ]



    Re: Order level discount  
David Messner [MSFT]


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


 
12-10-04 10:50 PM

You'll need to turn the expression into a SQL query.  There is an object
that can help you do this.  See ExprFltrQueryBldr
(Commerce.ExprFltrQueryBldr ):

from the docs: Use this object to translate an expression in Extensible
Markup Language (XML) form into a SQL filter query string. A filter query
returns a subset of items from a database based on a combination of
attribute values.

-djm
--
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2004 Microsoft Corporation.  All rights
reserved.

--------------------
From: "Sreeku_2002" <sreeku_2002@yahoo.com>
Newsgroups: microsoft.public.commerceserver.campaigns_csf
Subject: Re: Order level discount
Date: Thu, 09 Dec 2004 13:37:46 -0500
Organization: www.talkaboutsoftware.com
Message-ID:
< 8b7df5084f47c707d57cd5138982995e@localho
st.talkaboutsoftware.com>
X-Newsreader: www.talkaboutsoftware.com
Content-Type: text/plain;
References:
< 83bc13045ab60228fce784483b9b79cc@localho
st.talkaboutsoftware.com>
X-Complaints-To: abuse@supernews.com
Lines: 52
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fastwebnet.it!tiscali!new
sfeed1.ip.tiscali.net!news.tele.dk!news.tele.dk!small.news.tele.dk!sn-xit-02
!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
Xref: cpmsftngxa10.phx.gbl
microsoft.public.commerceserver.campaigns_csf:2916
X-Tomcat-NG: microsoft.public.commerceserver.campaigns_csf

Hi andy,

Thank you very much  for the your immediate
responses.As far as the question on evaluating target groups the
requirement is as follows.The client wants to send direct mails to a a
list of users generated using the various conditions avilable in target
groups.Hence we are trying to make a list from a target group the code is
given below.

The problem is we have to pass each profile to the target expression
seperately for evaluation.there is no way to evaluate a group of users
againist a traget expression or target group.
------------------------------------------------------------
CommerceContext csContext = CommerceContext.Current;
objDebug = csContext.DebugContext;
Microsoft.CommerceServer.Runtime.Targeting.ExpressionEvaluator objexpr =
new
Microsoft.CommerceServer.Runtime.Targeting.ExpressionEvaluator(constr,objDeb
ug);
ProfileContext profContext = CommerceContext.Current.ProfileSystem;
for(int i=0;i<dtProfiles.Rows.Count;i++)
{
bool flag = true;
for(int j=0;j<dtTargetExpr.Rows.Count;j++)
{
Profile prof =
profContext.GetProfile("logon_name",dtProfiles.Rows[i]["u_logon_name
"].ToStr
ing(),"UserObject");
TargetingProfileCollection profcoll = new
TargetingProfileCollection();
profcoll.Add("UserObject",prof);

if((objexpr.Evaluate((int)dtTargetExpr.Rows[j]["ExprID"],profcoll).T
oString(
)=="True")!=
(dtTargetExpr.Rows[j]["i_target_action"].ToString()=="2"))
{
flag = false;
}
objexpr.FlushCache();

}
if(flag)
{

objLib.AddUserToMailingList(oListID,dtProfiles.Rows[i]["u_email_addr
ess"].To
String(),dtProfiles.Rows[i]["g_user_id"].ToString(),
2, 1033, DBNull.Value);
}
}

------------------------------------------------------------


thanks and regards,
sreekanth







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 06:35 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