|
Home > Archive > Content Selection Framework > January 2005 > OrderLevelDiscountApply pipeline component
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
OrderLevelDiscountApply pipeline component
|
|
|
| Hi,
I am using the OrderLevelDiscountApply pipeline component
to process the order level discount coupon.
In this component the default radio button applydiscounts to all item is
selected. However I don't want any individual line item adjusted price to
be changed while applying discount at order total level.
In order to achieve this can I use the other option (Apply discounts to
item where the following key exists and corresponding value is nonzero) ?
I am planning to add a new property _product_Is_Discountable
to each line litem and set this value to zero.
Will this approach help me in discounting the order
subtotal without discounting the line level adjusted price?
Please let me know if there is any other approach to achieve this.
Reagrds,
Jimut.
| |
| David Messner [MSFT] 2005-01-05, 5:53 pm |
| Unfortunately the OrderLevelDiscountApply component does not work this way.
You would need to replace OrderLevelDiscountApply with your own pipeline
component to take the results of the OrderDiscount component and compute
the discount against the order subtotal.
It was designed to distribute the discount amount across the line items
evenly because this is the way most customers requested it to work. We
will consider this additional mode for a future release.
See "_orderlevel_discounts_detail" in the reference pages for OrderDiscount
for the definition of the output structure from OrderDiscount.
-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: "Jimut" <jimutbasa@yahoo.com>
Newsgroups: microsoft.public.commerceserver.campaigns_csf
Subject: OrderLevelDiscountApply pipeline component
Date: Wed, 05 Jan 2005 09:41:02 -0500
Organization: www.talkaboutsoftware.com
Message-ID:
< cd8532dd4065a2461a772b1211c6e9d2@localho
st.talkaboutsoftware.com>
X-Newsreader: www.talkaboutsoftware.com
Content-Type: text/plain;
X-Complaints-To: abuse@supernews.com
Lines: 26
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fastwebnet.it!tiscali!new
sfeed1.ip.tiscali.net!news.glorb.com!tdsnet-transit!newspeer.tds.net!sn-xit-
03!sn-xit-12!sn-xit-08!sn-post-02!sn-post-01!supernews.com!corp.supernews.co
m!not-for-mail
Xref: cpmsftngxa10.phx.gbl
microsoft.public.commerceserver.campaigns_csf:2962
X-Tomcat-NG: microsoft.public.commerceserver.campaigns_csf
Hi,
I am using the OrderLevelDiscountApply pipeline component
to process the order level discount coupon.
In this component the default radio button applydiscounts to all item is
selected. However I don't want any individual line item adjusted price to
be changed while applying discount at order total level.
In order to achieve this can I use the other option (Apply discounts to
item where the following key exists and corresponding value is nonzero) ?
I am planning to add a new property _product_Is_Discountable
to each line litem and set this value to zero.
Will this approach help me in discounting the order
subtotal without discounting the line level adjusted price?
Please let me know if there is any other approach to achieve this.
Reagrds,
Jimut.
| |
|
| Hi David,
Thanks a lot for the information.
Regards,
Jimut.
| |
| Zoe Hart [MVP] 2005-01-06, 5:53 pm |
| Jimut,
We have developed many Commerce Server sites where the business requirement
is to display line item pricing without order level discounts and to display
the order level discount as a separate line at the order level. In many
cases this is also a requirement for how order data is passed to the backend
fulfillment system. While Commerce Server applies the order level discount
to each line item, it tracks enough detail data that you can easily
calculate the non-discounted values. For example, if you want the line item
total without orderlevel discounts applied, you just need to calcuate
item.[_cy_oadjust_adjustedprice] + item.[_cy_orderlevel_discounts_subtotal].
We do this in a custom scriptor placed in the pipeline sometime after
OrderLevelDiscountApply. The full code in the scriptor looks like this:
for each item in orderform.items
if not IsNull(item.[_cy_orderlevel_discounts_subtotal]) then
item.[_cy_oadjust_displayprice] =
item.[_cy_oadjust_adjustedprice] + item.[_cy_orderlevel_discounts_subtotal]
else
item.[_cy_oadjust_displayprice] =
item.[_cy_oadjust_adjustedprice]
end if
next 'item
We then use our custom _cy_oadjust_displayprice in place of
_cy_oadjust_adjustedprice in our display and/or backend integration. Then we
have a separate scriptor in the Order Subtotal stage of the pipeline that
calculates the total order level discount as the sum of
_cy_orderlevel_discounts_subtotal for all line items:
for each item in orderform.items
if not IsNull(item.[_cy_orderlevel_discounts_subtotal]) then
item.[_cy_oadjust_displayprice] =
item.[_cy_oadjust_adjustedprice] + item.[_cy_orderlevel_discounts_subtotal]
else
item.[_cy_oadjust_displayprice] =
item.[_cy_oadjust_adjustedprice]
end if
next 'item
We've seen lots of different detail requirements about how people want
discounts handled and displayed and most of the time I find that the data
the OrderDiscount component stores in the orderform is sufficient for me to
come up with the numbers I need. They're just not necessarily there by
default.
Hope this helps.
Zoe
"Jimut" <jimutbasa@yahoo.com> wrote in message
news:1dc04d21e1e30a2906e19d838f5356d4@lo
calhost.talkaboutsoftware.com...
> Hi David,
>
> Thanks a lot for the information.
>
> Regards,
> Jimut.
>
| |
|
| Hi Zoe,
With your suggestion we could resolve most of our requirements. Thanks a
lot.
Regards,
Jimut.
|
|
|
|
|