|
Home > Archive > Commerce Server General > August 2005 > Help with Custom shipping Method 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 |
Help with Custom shipping Method component
|
|
| gwheeloc 2005-07-18, 8:47 pm |
| Looking for help/ideas
Does anyone have some example C# code on retrieving shipping method data
based on either weight, quantity or price? I want to create a replacement
for the stepwiseshipment pipeline component. I need to determine shipping
totals for each item based on custom business rules and then sum up the line
item values resulting in the shipping cost of the shipment.
The problem I'm having getting started is, the proper way to access the
shipping_method's data located in the (TableShippingRates) database table via
the shipping_method_id indicated on the OrderForm. While I don't need to
implement the "Multiple-shipment Shipping Architecture". I believe it offers
good flexibility for the site.
I've been stepping through the code of the MinMaxShip component, but it
assumes you want to change the shipping total after it has been calculated
via "normal processing" means. I could use it to back out the shipping
amounts but I'm still left with how to get to the shipping method's value
based on (quantity, weight, price) so I can back out the amount used based on
the Item's quantity, weight, or price.
I would be a great help if anyone could show me either a code example or an
outline of steps to follow I would appreciate it.
thanks,
gwheeloc
| |
| Nihit Kaul [MSFT] 2005-08-02, 6:03 pm |
| Hi,
Do you want to get the shipping method data on the site or in the pipeline
component you are developing?
On the site you can just use OrderContext.GetShippingMethods() and in the
pipeline component the Context dictionary should contain all the caches
including the ShippingMethodCache which will contain all the information
you need. The config data contains an XML blob with the type of the
ShippingMethod:
<DICTIONARY xmlns:dt="uuid:304FB305-29A4-11d3-B0D4-00C04F8ED7A2"
version="1.0">
<DICTITEM key="mode">
<VALUE dt:dt="i2">
0
</VALUE>
</DICTITEM>
</DICTIONARY>
Heop that helps.
Thanks,
Nihit Kaul[MSFT]
Commerce Server
http://blogs.msdn.com/nihitk
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
--------------------
Thread-Topic: Help with Custom shipping Method component
thread-index: AcWL82sUZKNyhmn4TAC6+ldW88eyXA==
X-WBNR-Posting-Host: 207.127.151.43
From: "=?Utf-8?B?Z3doZWVsb2M=?=" <gwheeloc@discussions.microsoft.com>
Subject: Help with Custom shipping Method component
Date: Mon, 18 Jul 2005 16:50:03 -0700
Lines: 26
Message-ID: <93BA21AA-5492-466E-9D98-F10C9C00D4D1@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.commerceserver.general:3043
X-Tomcat-NG: microsoft.public.commerceserver.general
Looking for help/ideas
Does anyone have some example C# code on retrieving shipping method data
based on either weight, quantity or price? I want to create a replacement
for the stepwiseshipment pipeline component. I need to determine shipping
totals for each item based on custom business rules and then sum up the
line
item values resulting in the shipping cost of the shipment.
The problem I'm having getting started is, the proper way to access the
shipping_method's data located in the (TableShippingRates) database table
via
the shipping_method_id indicated on the OrderForm. While I don't need to
implement the "Multiple-shipment Shipping Architecture". I believe it
offers
good flexibility for the site.
I've been stepping through the code of the MinMaxShip component, but it
assumes you want to change the shipping total after it has been calculated
via "normal processing" means. I could use it to back out the shipping
amounts but I'm still left with how to get to the shipping method's value
based on (quantity, weight, price) so I can back out the amount used based
on
the Item's quantity, weight, or price.
I would be a great help if anyone could show me either a code example or an
outline of steps to follow I would appreciate it.
thanks,
gwheeloc
|
|
|
|
|