# line_item

> The line_item Liquid object in a Shoplazza theme, representing one line of a cart or an order for a single product variant, with the full list of its properties.

A line in a cart, or order. Each line item represents a product variant.

  
    
      
        Properties
      

      
        Type
      

      
        Description
      
    
  

  
    
      
        `allocation_method`
      

      
        [string](../basics/liquid-types#string) from a set of values, refer to [allocation\_method values](./line_item#allocation_method-values)
      

      
        Purchase limit rules.
      
    

    
      
        `allow_oversold`
      

      
        [string](../basics/liquid-types#string) from a set of values, refer to [allow\_oversold values](./line_item#allow_oversold-values)
      

      
        Whether to buy at the selling price after the sale exceeds.
      
    

    
      
        `can_buy`
      

      
        [boolean](../basics/liquid-types#boolean)
      

      
        Returns `true` if the line item's variant can be sold. Returns `false` if not.
      
    

    
      
        `cart_id`
      

      
        [string](../basics/liquid-types#string)
      

      
        The cart id of the parent cart of the line item.
      
    

    
      
        `compare_at_price`
      

      
        [string](../basics/liquid-types#string)
      

      
        The **compare at** price of the line item.
      
    

    
      
        `customary_off_ratio`
      

      
        [number](../basics/liquid-types#number)
      

      
        The customary discount ratio of the line item.
      
    

    
      
        `customary_saved_price`
      

      
        [string](../basics/liquid-types#string)
      

      
        The customary saved price of the line item.
      
    

    
      
        `barcode`
      

      
        [string](../basics/liquid-types#string)
      

      
        The barcode of the line item's variant.
      
    

    
      
        `discount_applications`
      

      
        an array of [discount\_application](./discount_application)
      

      
        The discount applications for the line item.
      
    

    
      
        `discount_id`
      

      
        [string](../basics/liquid-types#string)
      

      
        The id of the discount application of the line item.
      
    

    
      
        `discount_off_ratio`
      

      
        [string](../basics/liquid-types#string)
      

      
        The discount ratio of the line item.
      
    

    
      
        `discount_price`
      

      
        [string](../basics/liquid-types#string)
      

      
        The discount price of the line item.
      
    

    
      
        `discount_sales`
      

      
        [number](../basics/liquid-types#number)
      

      
        The sales of the discount of the line item's variant.
      
    

    
      
        `discount_saved_price`
      

      
        [number](../basics/liquid-types#number)
      

      
        The discount saved price of the line item.
      
    

    
      
        `discount_stock`
      

      
        [number](../basics/liquid-types#number)
      

      
        The stock of the discount of the line item's variant.
      
    

    
      
        `discount_total`
      

      
        [string](../basics/liquid-types#string)
      

      
        The discount total of the line item.
      
    

    
      
        `ends_at`
      

      
        [number](../basics/liquid-types#number)
      

      
        A timestamp of the end of the discount.
      
    

    
      
        `final_line_price`
      

      
        [string](../basics/liquid-types#string)
      

      
        The combined price, in the store's main currency unit, not the subunit, of all of the items in the line item. This includes any line-level discounts.  

        The value is equal to `line_item.final_price` multiplied by `line_item.quantity`. It's output in the customer's local (presentment) currency.
      
    

    
      
        `final_price`
      

      
        [string](../basics/liquid-types#string)
      

      
        The price of the line item in the store's main currency unit, not the subunit. This includes any line-level discounts.  

        The value is output in the customer's local (presentment) currency.
      
    

    
      
        `id`
      

      
        [string](../basics/liquid-types#string)
      

      
        The ID of the line item.
      
    

    
      
        `image`
      

      
        [image](./image)
      

      
        The image of the line item's variant.
      
    

    
      
        `inventory_quantity`
      

      
        [number](../basics/liquid-types#number)
      

      
        The inventory quantity of the line item's variant.
      
    

    
      
        `line_price`
      

      
        [string](../basics/liquid-types#string)
      

      
        The combined price of the line item.
      
    

    
      
        `mixed_wholesale`
      

      
        [boolean](../basics/liquid-types#boolean)
      

      
        Returns `true` if the line item's product supports mixed wholesale. Returns `false` if not.
      
    

    
      
        `note`
      

      
        [string](../basics/liquid-types#string)
      

      
        The note of the line item.
      
    

    
      
        `options`
      

      
        an array of [variant\_option](./variant_option)
      

      
        The values of the line item's variant of the product option.
      
    

    
      
        `original_line_price`
      

      
        [number](../basics/liquid-types#number)
      

      
        The original price of the line item.
      
    

    
      
        `price`
      

      
        [string](../basics/liquid-types#string)
      

      
        The price of the line item.
      
    

    
      
        `product_handle`
      

      
        [string](../basics/liquid-types#string)
      

      
        The handle of the line item's product.
      
    

    
      
        `product_id`
      

      
        [string](../basics/liquid-types#string)
      

      
        The [ID](./product) of the line item's product.
      
    

    
      
        `product_tags`
      

      
        an array of [string](../basics/liquid-types#string)
      

      
        The tags of the line item's product.
      
    

    
      
        `product_title`
      

      
        [string](../basics/liquid-types#string)
      

      
        The title of the line item's product.
      
    

    
      
        `product_url`
      

      
        [string](../basics/liquid-types#string)
      

      
        The URL of the line item's product.
      
    

    
      
        `properties`
      

      

      

      
        The properties of the line item.  

        You can add, or allow customers to add, custom information to a line item by the [Product options](https://appstore.shoplazza.com/listing/47587/product-options/?locale=en-US\&utm_source=store_admin\&from=store_admin\&store_id=166387\&user_id=183c3f3b-f815-43d8-aff0-bebc08e01c31\&keyword=product\&page=1\&order_by=best_match) app.
      
    

    
      
        `published`
      

      
        [boolean](../basics/liquid-types#boolean)
      

      
        Returns `true` if the line item's product was published. Returns `false` if not.
      
    

    
      
        `quantity`
      

      
        [string](../basics/liquid-types#string)
      

      
        The quantity of the line item.
      
    

    
      
        `requires_shipping`
      

      
        [boolean](../basics/liquid-types#boolean)
      

      
        Returns `true` if the line item's product needs shipping. Returns `false` if not
      
    

    
      
        `retail_price`
      

      
        [string](../basics/liquid-types#string)
      

      
        The retail price of the line item's variant in the store's main currency unit, not the subunit..
      
    

    
      
        `saved_price`
      

      
        [number](../basics/liquid-types#number)
      

      
        The saved price of the line item.
      
    

    
      
        `sku`
      

      
        [string](../basics/liquid-types#string)
      

      
        The SKU of the line item's variant.
      
    

    
      
        `starts_at`
      

      
        [number](../basics/liquid-types#number)
      

      
        A timestamp of the start of the discount.
      
    

    
      
        `store_id`
      

      
        [string](../basics/liquid-types#string)
      

      
        The store id.
      
    

    
      
        `taxable`
      

      
        [boolean](../basics/liquid-types#boolean)
      

      
        Returns `true` if taxes should be charged on the line item's product. Returns `false` if not.
      
    

    
      
        `use_before_price`
      

      
        [number](../basics/liquid-types#number)
      

      
        Returns `false` if the price before the line item isn't used.
      
    

    
      
        `variant_id`
      

      
        [string](../basics/liquid-types#string)
      

      
        The [ID](./variant) of the line item's variant.
      
    

    
      
        `variant_title`
      

      
        [string](../basics/liquid-types#string)
      

      
        The title of the line item's variant.
      
    

    
      
        `vendor`
      

      
        [string](../basics/liquid-types#string)
      

      
        The vendor of the line item's product.
      
    

    
      
        `vendor_url`
      

      
        [string](../basics/liquid-types#string)
      

      
        The vendor URL of the line item's product.
      
    

    
      
        `weight`
      

      
        [string](../basics/liquid-types#string)
      

      
        The weight of the line item's variant.
      
    

    
      
        `weight_unit`
      

      
        [string](../basics/liquid-types#string)
      

      
        The weight unit of the line item's variant.
      
    

    
      
        `wholesale_price`
      

      
        [array](../basics/liquid-types#array)
      

      
        The wholesale price of the line item's variant.
      
    
  

### allow\_oversold values

| Possible values | Description                         |
| :-------------- | :---------------------------------- |
| check           | Buy at selling price after oversold |
| uncheck         | not oversell                        |

### allocation\_method values

| Possible values | Description                                                               |
| :-------------- | :------------------------------------------------------------------------ |
| all             | Purchase limit specified per person per activity.                         |
| each            | Each person is limited to purchasing the specified quantity of each item. |
| none            | No limit.                                                                 |

```json title="Object"
{
  "id": "298049_1825cbb82902c53fdc4e12283829e832",
  "properties": "",
  "note": "",
  "variant_id": "4a3d825c-2fac-4f72-a68b-b8604b0935c4",
  "product_id": "b1ab6324-ae4f-4cca-907e-18af16839447",
  "quantity": "1",
  "discount_id": "65c00d9b-060c-4206-a2d8-f2971cacee43",
  "limit_time": -1,
  "limit_buy": 0,
  "user_limit_buy": -1,
  "discount_sales": 1,
  "discount_sales_rate": "1",
  "discount_stock": 87,
  "ends_at": -1,
  "starts_at": 1682405275,
  "allow_oversold": "uncheck",
  "allocation_method": "none",
  "price": "205.2",
  "compare_at_price": "228",
  "discount_price": "205.2",
  "customary_saved_price": "22.8",
  "customary_off_ratio": 10,
  "discount_saved_price": "22.8",
  "discount_off_ratio": "10",
  "use_before_price": false,
  "before_price": "188",
  "title": "促销",
  "trunk_price": "0",
  "total_price": "0",
  "inventory_tracking": true,
  "inventory_policy": "deny",
  "inventory_quantity": 87,
  "cart_id": "298049",
  "store_id": "7126",
  "user_id": "",
  "user_sign": "8f7be7ef-367f-473c-91b6-b32a75971450",
  "created_at": "2023-07-06 14:09:48",
  "updated_at": "2023-07-06 14:09:48",
  "custom": false,
  "parts_price": null,
  "variant_title": "pink",
  "product_title": "Sale Squared Sunglasses ",
  "product_handle": "sale-squared-sunglasses",
  "product_tags": [
    "Color_Lightcoral",
    "Location_Alabama",
    "Price_$200-$300"
  ],
  "published": true,
  "published_at": "2022-08-11T08:15:07Z",
  "product_url": "/products/sale-squared-sunglasses",
  "available": true,
  "available_quantity": 87,
  "cost_price": "0.00",
  "weight": "0.00",
  "weight_unit": "kg",
  "sku": "",
  "spu": "",
  "vendor": "Nero Theme Fashion",
  "vendor_url": "",
  "taxable": false,
  "requires_shipping": true,
  "barcode": "",
  "mixed_wholesale": false,
  "tax_code": "",
  "retail_price": "0.00",
  "product_type": "",
  "image": {
    "src": "//cdn.shoplazza.com/d8217e1e2e216cd8b71b1035bde035ec.jpeg",
    "path": "d8217e1e2e216cd8b71b1035bde035ec.jpeg",
    "width": 1280,
    "height": 1710,
    "alt": ""
  },
  "options": [
    {
      "name": "Color",
      "value": "pink"
    }
  ],
  "wholesale_price": [
    {
      "min_quantity": 1,
      "price": "205.20"
    }
  ],
  "discount_applications": [
    {
      "type": "discount_flashsale",
      "subtype": "discount_flashsale",
      "discount_id": "65c00d9b-060c-4206-a2d8-f2971cacee43",
      "title": "促销",
      "value": "",
      "discount_type": "",
      "value_type": "",
      "allocation_method": "",
      "target_selection": "",
      "target_type": "",
      "total_discount_amount": "0",
      "discount_amount": "0",
      "is_free_gift": false,
      "icon": "//cdn.shoplazza.com/oss/operation/372e6ab307143855fbd0ad3d28568d1e.svg"
    }
  ],
  "saved_price": 22.8,
  "line_price": "205.20",
  "original_line_price": 228,
  "flashsale_tip": false,
  "discount_info": {
    "id": "298049",
    "variant_id": "4a3d825c-2fac-4f72-a68b-b8604b0935c4",
    "product_id": "b1ab6324-ae4f-4cca-907e-18af16839447",
    "quantity": 1,
    "discount_id": "65c00d9b-060c-4206-a2d8-f2971cacee43",
    "limit_time": -1,
    "limit_buy": 0,
    "user_limit_buy": -1,
    "discount_sales": 1,
    "discount_sales_rate": "1",
    "discount_stock": 87,
    "ends_at": -1,
    "starts_at": 1682405275,
    "allow_oversold": "uncheck",
    "allocation_method": "none",
    "price": "205.2",
    "compare_at_price": "228",
    "discount_price": "205.2",
    "customary_saved_price": "22.8",
    "customary_off_ratio": "10",
    "discount_saved_price": "22.8",
    "discount_off_ratio": "10",
    "use_before_price": false,
    "before_price": "188",
    "title": "促销",
    "trunk_price": "0",
    "total_price": "0",
    "inventory_tracking": true,
    "inventory_policy": "deny",
    "inventory_quantity": 87
  },
  "item_id": "298049",
  "can_buy": true,
  "discount_total": "0.00",
  "final_line_price": "205.20",
  "final_price": "205.20"
}
```
