Поделиться через


Orders Objects

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

This topic provides a brief description of the key classes in the Microsoft.CommerceServer.Runtime.Orders namespace and the Microsoft.CommerceServer.Orders namespace.

Orders Runtime Classes

The Microsoft.CommerceServer.Runtime.Orders namespace contains the classes that you use to interact with the Orders System at run time. See Orders Runtime Object Model for a diagram that illustrates the relationships among the key classes.

The following table provides a description of each of the classes.

Class Name

Description

Basket

A type of OrderGroup that represents a shopping cart. A user may have multiple baskets with different names, for example a current basket and a wish list.

DiscountApplicationRecord

A discount that applies to a LineItem.

DiscountApplicationRecordCollection

The set of all DiscountApplicationRecords for this LineItem.

LineItem

A product that the user placed in a shopping cart. The line item may represent a single product, or more than one of the same product.

LineItemCollection

The set of all products in a single OrderForm.

OrderAddress

An address.

OrderAddressCollection

The set of all of the user's addresses. For example, a user might have a work address and a home address.

OrderContext

Represents the orders system itself. The OrderContext contains references to information that is associated with the orders system in general, such as the set of valid payment methods, the set of valid shipping methods, or the shopping carts of all active users.

OrderForm

A set of products that the user placed in a shopping cart. Depending on how far the user has progressed through the purchasing process, an OrderForm might also contain the locations to ship the products to, the discounts that apply to the OrderGroup, and the ways that the user paid or will pay for the products.

OrderFormCollection

The set of all OrderForms in a single OrderGroup.

In a Business-to-Consumer (B2C) site, an OrderGroup commonly contains only one OrderForm. However, in a Business-to-Business (B2B) site, an OrderGroup might contain multiple OrderForms. For example, in a B2B scenario you could use multiple OrderForms to represent products that are sent to different locations of the same customer, where each location pays with its own purchase order.

OrderGroup

An order that a user placed, saved, or might place. The order can contain products, shipping information, payment information, and information about discounts. There are three specific types of OrderGroups:

  1. A PurchaseOrder represents an order that the user has placed.

  2. An OrderTemplate represents an order that the user has saved.

  3. A Basket represents an order that the user is currently working with.

OrderGroupCollection

A set of OrderGroups.

OrderTemplate

A type of OrderGroup that represents a shopping cart that the user has saved, but that the user is not actively working with. This is a legacy class. Use a named Basket instead.

Payment

A payment, including the amount. Commerce Server provides Payment subclasses that represent specific types of payments. These subclasses are:

  1. GiftCertificatePayment

  2. CreditCardPayment

  3. CashCardPayment

  4. PurchaseOrderPayment

PaymentCollection

The set of all payments for this OrderForm.

PromoCodeRecord

A code that is associated with a marketing discount. For example, a retailer might tell frequent customers to enter the promotion code "FX43B" to receive a 10% discount on the entire order.

PromoCodeRecordCollection

The set of all PromoCodeRecords for this OrderForm.

PurchaseOrder

A type of OrderGroup that represents a completed order.

Shipment

A shipment, including the products to ship and the address to ship them to.

ShipmentCollection

The set of all Shipments for this OrderForm.

ShippingDiscountCollection

The set of all ShippingDiscountRecords for this Shipment.

ShippingDiscountRecord

A discount that applies to shipping charges.

Orders Data Management Classes

The key classes that you use to interact with the Orders System from business applications are in the Microsoft.CommerceServer.Orders namespace. See Orders Data Management Object Model for a diagram that illustrates the relationships among these classes.

Note

Do not use the PaymentMethodManager class or the ShippingMethodManager class from site code. Use GetPaymentMethods and GetShippingMethods instead.

The following table provides a description of each of the key classes.

Class Name

Description

BasketManager

The starting point for performing data management operations on baskets. For example, you use the BasketManager to search for a Basket.

OrderManagementContext

The starting point for performing data management operations on all objects in the Orders System.

PaymentMethod

A way that a customer can pay for products. For example, a credit card might be a payment method.

PaymentMethodCollection

The set of all PaymentMethods that are configured for the site.

PaymentMethodManager

The starting point for performing data management operations on payment methods. For example, you use the PaymentMethodManager to add a new PaymentMethod.

PurchaseOrderManager

The starting point for performing data management operations on purchase orders. For example, you use the PurchaseOrderManager to delete a purchase order.

ShippingMethod

A way that a customer can ship products. For example, next day air service might be a shipping method.

ShippingMethodCollection

The set of all ShippingMethods that are configured for the site.

ShippingMethodManager

The starting point for performing data management operations on shipping methods. For example, you use the ShippingMethodManager to add a new ShippingMethod.

See Also

Other Resources

Orders Runtime Object Model

Orders Data Management Object Model

Orders Object Model