| David Messner [MSFT] 2005-01-13, 5:51 pm |
| The answer is in an optimization made by the ReservePromotionCodes
component so that it doesn't have to repeatedly perform database lookups.
From the documentation:
promo_code_info OrderForm (read/write)
Simplelist of Dictionaries that correspond to PromoCodeRecordCollection
(OrderForm.PromoCodeRecords) in the Order System object model. On output,
there is exactly one entry in this list for each promotion code string in
the promo_codes list. This list is also persisted with baskets and the
information in each entry is trusted by the ReservePromoCodes component for
the amount of time specified by the
i_PromoCodeRenewReservationAfter_Minutes
resource property setting.
So you can delete the entry from this list that corresponds to the removed
promotion code.
(Note the gook about 'Order System object model' doesn't apply to FP1 and
shouldn't have been there - that'll apply to V.NEXT, however!).
-djm
--
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2005 Microsoft Corporation. All rights
reserved.
--------------------
From: "Jimut" <jimutbasa@yahoo.com>
Newsgroups: microsoft.public.commerceserver.campaigns_csf
Subject: Nullifying discount coupon
Date: Thu, 13 Jan 2005 08:32:36 -0500
Organization: www.talkaboutsoftware.com
Message-ID:
< 8e94b866b9047dd6480910e2152ad383@localho
st.talkaboutsoftware.com>
X-Newsreader: www.talkaboutsoftware.com
Content-Type: text/plain;
X-Complaints-To: abuse@supernews.com
Lines: 42
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.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-08!sn-post-01!supernews.com!co
rp.supernews.com!not-for-mail
Xref: cpmsftngxa10.phx.gbl
microsoft.public.commerceserver.campaigns_csf:2986
X-Tomcat-NG: microsoft.public.commerceserver.campaigns_csf
The Requirement in the project is like this:
User can enter a Promotional coupon and see the discounted price by using
Calculate button without purchasing.
User has the option to modify the discount coupon details and check the
price. Thus each time when the user is entering a new coupon code we need
to nullify the discount applied by the previous coupon and process with
the new coupon and show the discount only for the new coupon.
The step I am following it:
1. Associate the first coupon entered by the user with
OrderForm["promo_codes"]
2. Process the order form through basket pipeline (which is having
discount components)
3. Obtain the discounted order subtotal from the orderform.
4. When the user enter the second coupon after removing the first one I
remove the first coupon from OrderForm["promo_codes"] and associate the
new coupon to the OrderForm["promo_codes"]
5. Execute the pipeline again.
6. This time the order subtotal applies the discount for both the
coupons.
Why the discounted value of the previous coupon is is persisting though I
have removed it from order form. Is there any way I can get rid of the
value of previous coupon when I am reprocessing the order.
(The Order adjust stage of pipeline has the following components in this
order)
1. Commerce Reserve Promo Codes
2. Order Discount
3. Order Level Discount Applied
4. Commerce.Record Promocode
5. Required Order Adjust price
2. Commerce Record
Regards,
Jimut.
|