Skip to content

Product, price, and inventory parts and fields

Bertrand Le Roy edited this page Oct 26, 2018 · 2 revisions

Those parts and fields implement the basic building blocks for products that can't be found in the core parts provided by Orchard Core itself. The parts should apply the single responsibility principle, for easier composition.

Discussion link

Product part

This is largely a marker part, used primarily to identify a content type as a product. Its only property is:

Price part and field

Represents a price, using the following properties:

  • Amount (decimal)
  • Currency

Inventory

Tracks the number of available items.

  • Inventory (int) The number of items in stock.
  • AllowsBackOrder (bool) If true, ordering is allowed even if Inventory is less or equal to zero.
  • OutOfStockMessage (string) Enables a specific message for an out of stock product (can be used to give an ETA).
  • ConsiderInventory (bool) True by default. If false, inventory is ignored. This is useful for digital products for example.
  • MinimumOrderQuantity (int) 1 by default. The minimum number of this item one can order.
Clone this wiki locally