Coupon 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 > Coupon discount




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

    Coupon discount  
Alex


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


 
07-05-04 10:50 PM

Hi Andy,

Thanks for your respond in conference.
I still have the same issue when after running the modified (I've
added 2 new components for PromoCodes) Basket.pcf I have no discount
for specified coupon. Discount is approved, I'm working on my local
box, IIS is resetted many times 

I tried to trace execution of Basket.pcf in SQL Profiler. I saw only
one call of stored procedure. I made the same call with the same
parameters in QueryAnalyzer and got one record with data for my coupon
discount. As I understand, this coupon discount is available and by
some reason it doesn't apply to my Basket object.

Any help from you will be GREAT!

Thanks a lot
Alex





[ Post a follow-up to this message ]



    RE: Coupon discount  
Andy Xu[MSFT]


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


 
07-09-04 08:13 PM

Alex,

A simple yet very helpful way to debug/trace basket discount related issues 
is to take advantage of orderform._discounts_trace_info generated by OrderDi
scount component, in order to let it generate the trace
info, you have to set Context._trace_discounts before calling OrderDiscount,
 refer to commerce server documentation for details (search "_trace_discount
s")

I include a sample here. You can create a scriptor component BEFORE OrderDis
count and use the following script:

///////////////////////////  beginning of the code snippet /////////////////
////////////////////////
'The following entry points are available (shown in VBScript format):

function MSCSExecute(config, orderform, context, flags)
context.Value("_trace_discounts") = 1
MSCSExecute = 1
end function

sub MSCSOpen(config)
end sub

sub MSCSClose()
end sub
//////////////////////////////// end of the code snippet ///////////////////
/////////////////////////////

Then create a scriptor component AFTER OrderDiscount and use the following s
cript:

///////////////////////////////// beginning of the code snippet ////////////
////////////////////////////
' this script assumes you set the filename parameter to a
' valid filename for output. The directory the output file is written to mus
t be set up to
' have write access via the user your IIS is running as.
'
' For example, you could set
' filename=c:\discounttrace.log
' in the Parameters control.
'
' This would assume your IIS user can write to c:\
'

function MSCSExecute(config, orderform, context, flags)

Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile(config.filename, True)

a.WriteLine("********** Discount Trace Info ****************")

a.WriteLine(cstr(orderform.Value("_discounts_trace_info")))

a.Close

MSCSExecute = 1
end function

sub MSCSOpen(config)

end sub


sub MSCSClose()

end sub

///////////////////////////////// end of the code snippet //////////////////
////////////////////////////////

You need to specify a log file name in the second scriptor component's prope
rty page. And make sure your IIS process identity has permission to write th
at log file.

Save the pipeline, IISRESET and run your basket and check what the trace inf
ormation says.

BTW, I am still a little confused about your data: you said that " you have 
NO discount for specified coupon"? If that's the case, even shopper inputs t
he correct coupon, he/she still can not get any discount (since
there is none) by design, correct?

HTH,
Andy Xu [MSFT]
Commerce Server Team
--
This posting is provided "AS IS" with no warranties, and confers no rights. Use of incl
uded 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 mess
age are best directed to the newsgroup/thread from which they originated.
--------------------
From: alexr@eidenai.ca (Alex)
Newsgroups: microsoft.public.commerceserver.campaigns_csf
Subject: Coupon discount
Date: 5 Jul 2004 10:07:04 -0700
Organization: http://groups.google.com
Lines: 18
Message-ID: <561c5247.0407050907.31ebeca3@posting.google.com>
NNTP-Posting-Host: 66.46.139.106
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1089047224 454 127.0.0.1 (5 Jul 2004 17:07:04 GM
T)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 5 Jul 2004 17:07:04 +0000 (UTC)
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfe
ed00.sul.t-online.de!t-online.de!fr.ip.ndsoftware.net!proxad.net!postnews2.g
oogle.com!not-for-mail
Xref: cpmsftngxa06.phx.gbl microsoft.public.commerceserver.campaigns_csf:277
0
X-Tomcat-NG: microsoft.public.commerceserver.campaigns_csf

Hi Andy,

Thanks for your respond in conference.
I still have the same issue when after running the modified (I've
added 2 new components for PromoCodes) Basket.pcf I have no discount
for specified coupon. Discount is approved, I'm working on my local
box, IIS is resetted many times 

I tried to trace execution of Basket.pcf in SQL Profiler. I saw only
one call of stored procedure. I made the same call with the same
parameters in QueryAnalyzer and got one record with data for my coupon
discount. As I understand, this coupon discount is available and by
some reason it doesn't apply to my Basket object.

Any help from you will be GREAT!

Thanks a lot
Alex







[ Post a follow-up to this message ]



    Re: Coupon discount  
Alex


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


 
07-09-04 09:16 PM

Got it fixed!!!
The problem was with Targeting Expressions.
My fault! 





[ Post a follow-up to this message ]



    Sponsored Links  




 





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