![]() Commerce Shipping embeds its service component information as a data attribute. For example, Commerce Cart adds a value for storing a line item's product's display path. The data property is useful for providing information flags. The Total is the sum of the line item's quantity and its unit price.Unit Price is the actual price of the line item.Commerce line item does not provide checks to combine line items and increment a quantity count, that is the duty of the module (such as Commerce Cart.) Quantity is the total amount of this particular line item that is attached to the order.Commerce Product sets this as the product's SKU, for example. Line item labels are the human readable identifier of the line item.Unique use case data can be attached to line items without requiring a new field or altering the module's schema. Data is simple a serialized array stored in the database.As stated previously, line items are designed to be the background bridge connecting the components of Commerce, constructing an order. The Order ID is a foreign key to the Commerce Order which owns the line item.This allows representation of products, discounts, shipping with unique fields or property manipulation. Line item types are the entity bundle to provide different instances of line items.Others are used programmatically within the system and contributed modules. All line items also have two price fields attached, which is locked and cannot be modified.Ĭertain properties are attached as pseudo fields (label, quantity) from the entities properties. Line item entities have specified properties that appear as attached fields. Or a fee or shipping service and add a line item to affect the order's total. This way the order now has the product and a bridge to reference its attributes. If a product is added to an order, a new line item is created that references that product. For example, line items create the foundation of what constitutes an order. Instead, think of line items as reference bridges and ways to provide data attributes along the way. Line items are not directly exposed for utilization. Line items are fieldable entities with predefined components. It is automatically bundled into a line item's price components. I> Tax is not handled as a line item and is treated differently. Many contributed modules that interact with Commerce provide their own line item, such as Commerce Discount and Commerce Shipping. This chapter covers the Line Item module which provides the entity that powers the back end of how Commerce operates. The goal of this book is to teach the underlying architecture and implementation of the Commerce module.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |