Set Shipping Rates
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
Set Shipping Rates

 
Post new topic   Reply to topic    Windows Server Forum Index -> Commerce Server
Author Message
Drew
Guest





Posted: Sun Oct 30, 2005 9:50 pm    Post subject: Set Shipping Rates Reply with quote

Does anyone know how to write a custom page to set shipping rates for a
specific method in .net?

The runtime objects only have a getshippingmethods method. Somehow I would
like to open the marshalled data to retrieve the rates, display them, and
have the ability to update them.

Please let me know if anyone has been able to accomplish this.

Thanks,
Drew
Back to top
Nihit Kaul [MSFT]
Guest





Posted: Thu Nov 10, 2005 9:51 pm    Post subject: RE: Set Shipping Rates Reply with quote

The following class should help you do this:

ShippingMethodManager.CreateMethodInstance Method (PIA)

From the Help:

ShippingMethodManager.CreateMethodInstance Method (PIA)
Use this method to create a new shipping method.

Definition
[Visual Basic .NET]
Imports Microsoft.CommerceServer.Interop.Orders

Public Function CreateMethodInstance(
ByRef bOnDisk As Object
) As Object
[C#]
using Microsoft.CommerceServer.Interop.Orders;

public object CreateMethodInstance(
ref object bOnDisk
);
Parameters
[Visual Basic .NET]
bOnDisk
An Object containing a Boolean indicating whether or not to create the
shipping method on disk. This parameter is usually set to True.
[C#]
bOnDisk
An object containing a bool value indicating whether or not to create the
shipping method on disk. This parameter is usually set to True.
Return Values
[Visual Basic .NET] If this method completes successfully, it returns an
Object containing a string that is the method ID of the new shipping
method. The method returns an empty string when the bOnDisk parameter is
False.

[C#] This method returns an object containing a string that is the method
ID of the new method. It is set to an empty string value if the bOnDisk
parameter is False.

Exceptions
This method may throw one of many mapped exceptions or an exception of type
COMException. See Standard COM Errors for additional details.

Remarks
If the shipping method is created to be saved on disk (the bOnSaved
parameter is True), the function adds a new record to the current recordset
with the enabled column value set to zero (0) and the shipping_method_id
column set to the new shipping method ID.


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
Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Commerce Server All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB